I have the following result from a UDP throughput test as measured by iperf3
$ iperf3 -u -t 10 -c 192.168.1.2 -b 100M -V
iperf 3.6+
Linux pi-raspberry1 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l
Control connection MSS 1448
Setting UDP block size to 1448
Time: Thu, 04 Oct 2018 09:58:29 GMT
Connecting to host 192.168.1.2, port 5201
Cookie: h3wj4by4mtyobgtq42gsf62s3nfhymg6djry
[ 5] local 192.168.1.1 port 40988 connected to 192.168.1.2 port 5201
Starting Test: protocol: UDP, 1 streams, 1448 byte blocks, omitting 0 seconds, 10 second test, tos 0
[ ID] Interval Transfer Bitrate Total Datagrams
[ 5] 0.00-1.00 sec 3.34 MBytes 28.0 Mbits/sec 2421
[ 5] 1.00-2.00 sec 3.13 MBytes 26.2 Mbits/sec 2264
[ 5] 2.00-3.00 sec 2.15 MBytes 18.1 Mbits/sec 1560
[ 5] 3.00-4.00 sec 905 KBytes 7.41 Mbits/sec 640
[ 5] 4.00-5.00 sec 486 KBytes 3.98 Mbits/sec 344
[ 5] 5.00-6.00 sec 2.19 MBytes 18.4 Mbits/sec 1587
[ 5] 6.00-7.00 sec 2.55 MBytes 21.4 Mbits/sec 1848
[ 5] 7.00-8.00 sec 2.18 MBytes 18.3 Mbits/sec 1576
[ 5] 8.00-9.00 sec 2.72 MBytes 22.8 Mbits/sec 1968
[ 5] 9.00-10.00 sec 3.21 MBytes 26.9 Mbits/sec 2321
- - - - - - - - - - - - - - - - - - - - - - - - -
Test Complete. Summary Results:
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
[ 5] 0.00-10.00 sec 22.8 MBytes 19.1 Mbits/sec 0.000 ms 0/16529 (0%) sender
[ 5] 0.00-10.77 sec 22.8 MBytes 17.8 Mbits/sec 22.003 ms 4/16529 (0.024%) receiver
CPU Utilization: local/sender 9.8% (1.5%u/8.2%s), remote/receiver 1.5% (0.0%u/1.5%s)
If UDP constantly sends data without caring if they arrived or not, why is it that the amount of MBytes sent differs each second as well as the amount of total Datagrams sent does? Moreover I see that the same number of MBytes is seen by both the server and the client at the Summary Results, but the Bitrate is not the same, does this have to do with the bigger interval taken into account by the server (10.77 seconds instead of 10)?