Yeah I can't get my head around it. I tried changing the buffer length but it rejects the values even though they are in range according to the documentation.
-b, --bandwidth n[KM] Set target bandwidth to n bits/sec (default 1 Mbit/sec for UDP, unlimited for TCP).
If there are multiple streams (-P flag), the bandwidth limit is applied separately to
each stream. You can also add a ’/’ and a number to the bandwidth specifier. This
is called "burst mode". It will send the given number of packets without pausing,
even if that temporarily exceeds the specified bandwidth limit.
-l, --length n[KM] The length of buffers to read or write. iPerf works by writing an array of len bytes
a number of times. Default is 128 KB for TCP, 8 KB for UDP.
-w, --window n[KM] Sets the socket buffer sizes to the specified value. For TCP, this sets the TCP
window size. (this gets sent to the server and used on that side too)
iperf3 -ub 4M -c <IP>
iperf3: error - unable to read from stream socket: Resource temporarily unavailable
iperf3 -ub 3M -c <IP>
[ ID] Interval Transfer Bandwidth Total Datagrams
[ 4] 0.00-1.00 sec 330 KBytes 2.70 Mbits/sec 240
[ 4] 1.00-2.00 sec 367 KBytes 3.01 Mbits/sec 267
[ 4] 2.00-3.00 sec 366 KBytes 3.00 Mbits/sec 266
[ 4] 3.00-4.00 sec 366 KBytes 3.00 Mbits/sec 266
[ 4] 4.00-5.00 sec 367 KBytes 3.01 Mbits/sec 267
[ 4] 5.00-6.00 sec 366 KBytes 3.00 Mbits/sec 266
[ 4] 6.00-7.00 sec 366 KBytes 3.00 Mbits/sec 266
[ 4] 7.00-8.00 sec 367 KBytes 3.01 Mbits/sec 267
[ 4] 8.00-9.00 sec 366 KBytes 3.00 Mbits/sec 266
[ 4] 9.00-10.00 sec 366 KBytes 3.00 Mbits/sec 266
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-10.00 sec 3.54 MBytes 2.97 Mbits/sec 0.018 ms 0/2637 (0%)
[ 4] Sent 2637 datagrams
Ah, it seems the block size has to be lower than the MSS?
iperf3 -u -l 16K -c server
warning: Warning: UDP block size 16384 exceeds TCP MSS 1408, may result in fragmentation / drops
iperf3 -u -l 1408 -b 900M -c server
Connecting to host server, port 5201
[ ID] Interval Transfer Bandwidth Total Datagrams
[ 4] 0.00-1.00 sec 102 MBytes 859 Mbits/sec 76304
[ 4] 1.00-2.00 sec 103 MBytes 865 Mbits/sec 76798
[ 4] 2.00-3.00 sec 105 MBytes 878 Mbits/sec 77965
[ 4] 3.00-4.00 sec 102 MBytes 852 Mbits/sec 75641
[ 4] 4.00-5.00 sec 82.5 MBytes 692 Mbits/sec 61472
[ 4] 5.00-6.00 sec 88.1 MBytes 739 Mbits/sec 65593
[ 4] 6.00-7.00 sec 97.2 MBytes 815 Mbits/sec 72365
[ 4] 7.00-8.00 sec 103 MBytes 865 Mbits/sec 76825
[ 4] 8.00-9.00 sec 97.5 MBytes 818 Mbits/sec 72579
[ 4] 9.00-10.00 sec 83.0 MBytes 696 Mbits/sec 61815
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval Transfer Bandwidth Jitter Lost/Total Datagrams
[ 4] 0.00-10.00 sec 963 MBytes 808 Mbits/sec 0.021 ms 325/717357 (0.045%)
[ 4] Sent 717357 datagrams
The packet loss is probably contention on the VPS host at Mythic Beasts rather than the broadband.