containernetworking / plugins

Some reference and example networking plugins, maintained by the CNI team.
Apache License 2.0
2.23k stars 788 forks source link

Why the egress bandwidth limit were not effective during UDP transmission testing with iPerf3 #922

Open zqverse opened 1 year ago

zqverse commented 1 year ago

When testing UDP transmission, I get this result, the sender's bitrate is still 300Mbit/s, while the receiver's bitrate is 100Mbit/s.

[ ID] Interval Transfer Bitrate Total Datagrams [ 5] 0.00-1.00 sec 35.7 MBytes 300 Mbits/sec 26807 [ 5] 1.00-2.00 sec 35.8 MBytes 300 Mbits/sec 26826 [ 5] 2.00-3.00 sec 35.8 MBytes 300 Mbits/sec 26821 [ 5] 3.00-4.00 sec 35.8 MBytes 300 Mbits/sec 26826 [ 5] 4.00-5.00 sec 35.8 MBytes 300 Mbits/sec 26822 [ 5] 5.00-6.00 sec 35.8 MBytes 300 Mbits/sec 26826 [ 5] 6.00-7.00 sec 35.8 MBytes 300 Mbits/sec 26824 [ 5] 7.00-8.00 sec 35.8 MBytes 300 Mbits/sec 26823 [ 5] 8.00-9.00 sec 35.8 MBytes 300 Mbits/sec 26825 [ 5] 9.00-10.00 sec 35.8 MBytes 300 Mbits/sec 26822


Test Complete. Summary Results: [ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams [ 5] 0.00-10.00 sec 358 MBytes 300 Mbits/sec 0.000 ms 0/268222 (0%) sender [ 5] 0.00-10.07 sec 116 MBytes 96.6 Mbits/sec 0.142 ms 181195/268219 (68%) receiver

My bandwidth plugin setting is: { "type": "bandwidth", "capabilities": {"bandwidth": true}, "ingressRate": 200000000, "ingressBurst": 200000, "egressRate": 100000000, "egressBurst": 100000 }

Here I have two questions, please help me take a look. (When I test TCP transmission, these limitation are working)

  1. Why did the bandwidth restriction on the sender not take effect?
  2. If the sender's restriction did not take effect, why is the receiver's effective restriction egress at 100M instead of ingress at 200M?