I'm running a RPi4, with latest 4.19.97-v8+ kernel
OS is Rasbian Buster.
While running iperf3 UDP tests I encountered following situation:
Code: Select all
RPi4:
iperf3 -s -V
NUC:
iperf3 -c 192.xxx.x.xxx -V -i 1 -b 0 -u -t 60
Test Complete. Summary Results:
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
[ 5] 0.00-60.00 sec 6.62 GBytes 948 Mbits/sec 0.000 ms 0/4908290 (0%) sender
[ 5] 0.00-60.00 sec 3.43 GBytes 491 Mbits/sec 0.012 ms 2362789/4908290 (48%) receiver
CPU Utilization: local/sender 47.2% (8.3%u/38.9%s), remote/receiver 83.0% (7.2%u/75.9%s)
I did a lof testing - port swap, cable swap, PS swap, kernel swap (32/64), OS swap, NIC swap (external USB3-Gbit-NIC) and more.
Nothing changed the situation (very much).
One learning though: The external USB NIC shows twice the errorfree bandwidth (400 vs 200 MBit/s)
in comparison to the internal NIC.
Now. To make a long and frustrating story short, today I managed to get a huge step closer in surrounding the issue.
I simply started iperf3 with a specific ""Affinity"" of 2.
Code: Select all
RPi4:
iperf3 -s -V -A 2
Code: Select all
Test Complete. Summary Results:
[ ID] Interval Transfer Bitrate Jitter Lost/Total Datagrams
[ 5] 0.00-60.00 sec 6.63 GBytes 949 Mbits/sec 0.000 ms 0/4914870 (0%) sender
[ 5] 0.00-60.00 sec 6.62 GBytes 948 Mbits/sec 0.013 ms 2409/4914870 (0.049%) receiver
CPU Utilization: local/sender 50.8% (8.6%u/42.2%s), remote/receiver 80.5% (16.9%u/63.6%s)
Still not absolute happy, I wondered why I loose datagrams right in the beginning.
Here comes the solution (or better the workaround):
Subject: CPU governors
I was running the "ondemand" governor @600MHz idle.
I figured out I could get rid of lost datagrams altogether by switching to the performance governor.
Wow. That's something. That also means the whole acceleration process seems to cause datagram loss.
To make the main workaround persistent I isolated CPU0 in cmdline.txt (isolcpus=0).
OK. I have a workaround for now. And lost 1 CPU.
After all there seems to be a serious issue on network performance if an IRQ shares a CPU
with a user process or if there are load changes.
Isolating such an issue pretty much goes above my head. Therefore any ideas or hints are welcome?
I also experienced some kind of annoying micro stalls while typing on the RPi4, while being logged in via ssh.
That got much better now with the workaround in place.
Just to mention it: That micro-stall issue was pretty much gone while using the external NIC with a Realtek chip inside.
Another one:
While doing the investigation I stepped over another potential issue in the early phase.
I forced the internal network IF to 100MBit/s to get around the losses.
Code: Select all
ethtool -s eth0 speed 100 duplex full
However, with the NIC now at 100MBit, I found - by looking at the dmesg output - that the eth0 interface was restarting every 3-5 seconds.
I doubt that this is a normal behavior. I think that also needs a more in-depth analysis.
To wrap it up.
Something doesn't seem to be properly working in my setup OR inside the RPi4 when it comes to ethernet based networking.
Since I've been using RPi4 internal Wifi only from day 1, I didn't step on that issue earlier.
Once more, any further ideas are welcome. (Not that I havn't been looking around for ideas for quite some time.
a designer should have a look at it. If it turns out to be a real issue I'll issue a trouble ticket over @github. Just let me know.
SC