RPi4 USB Ethernet throughput? - Page 1
Forum section: electronics / general

author: blueskull
author_rank: Unknown
timestamp: May 12, 2020, 05:47:23 am
content: I was debugging my RPi4 router+NAS system, and for quite a while I was using its built-in GbE port for both WAN and LAN, the WAN being VLANed on the LAN port, and splitted by a VLAN capable switch.ETH0=LAN, ETH0.2=WAN, and the physical port is connected to switch's port 2, tagged as VLAN2 with WAN port, and untagged as VLAN1 with all other ports.All went well, and RPi4 has a really good throughput using its native GbE port.Until I went a bit more greedy and wanted to increase LAN file serving speed.I added a QNAP 5Gbps USB to 5Gbps NBASE-T adapter based on AQC111U, and then all went south.The new adapter hogs the CPU, and throttles at around 600Mbit/s using iperf3 TCP mode.When using UDP mode, the other computer sends 5Gbps of data, and the RPi4 only reports receiving a few tens of Mbps.To make sure it's not the fault of the NIC, I then tried with a universal USB3.0 to GbE adapter, and it also stuck at round 600Mbps in TCP mode (window=1m), and ~450Mbps in UDP mode without dropping packets (it went south at -b 500m).Kernel has already been set to BRB mode, in case you ask.Both NICs are known to work well when tested on more powerful computers, the GbE adapter reaches literally GbE speed, and the 5Gbps adapter reaches at least 3.5Gbps.The switch is also tested, with a pair of 10GbE adapters, and it happily reaches 9.something Gbps between a ThinkPad and a MacMini.So, what's the game plan? Should I just give up using RPi4 as a NAS, or is there a magical driver or setting that allows me to get at least 2.5Gbps throughput?The storage of the NAS shares the same USB3.0 controller, so theoretical maximum throughput is just 2.5Gbps. I don't expect 3.5Gbps speed, but at least give me beyond 1Gbps speed, not 600Mbps.Any recommendations?

author: Jeroen3
author_rank: Super Contributor
timestamp: May 12, 2020, 07:01:17 am
content: What does iperf do with a stock raspbian without the vlans?Reviews get >900 mbps with iperf,but then you're not doing anything with the data.

author: Jeroen3
author_rank: Super Contributor
timestamp: May 12, 2020, 08:09:43 am
content: You found this?https://www.phoronix.com/scan.php?page=news_item&px=Aquantia-AQtion-LinuxRaspbian is only up to 4.19, so you may no have the right driver yet.

author: OwO
author_rank: Super Contributor
timestamp: May 12, 2020, 10:15:00 am
content: Well duh, anything over USB has high overhead because of the additional packetization and handshaking. Don't expect to push out more than gigabit ethernet speeds out of the Pee either, because the software can't do it. If you are really intent on serving high speeds with only a few watts of power, the data must never touch any software.

author: Jeroen3
author_rank: Super Contributor
timestamp: May 12, 2020, 01:21:11 pm
content: If qnap runs linux, maybe their implementation of the kernel is open source, so you can see what they did to make it work.Or, perhaps there are some hard limits on the raspberry pi 4's USB capabilities.Althoughtomshardwarereports faster bitrates for SSDs...

author: Jeroen3
author_rank: Super Contributor
timestamp: May 12, 2020, 01:58:14 pm
content: What is your intent? Maybe we can come up with some alternative approaches.

author: ralphrmartin
author_rank: Frequent Contributor
timestamp: May 12, 2020, 05:56:28 pm
content: Not really answering your questions, but I have a Sandisk SSD connected via USB to a an RPi 4, which is connected via GBE to my network, and,using samba, I can get up/download speeds of around 600-700 Mbps over wifi to my laptop. I find that fine for many tasks, even when treating the files like local storage. Your usage may differ...

author: Jeroen3
author_rank: Super Contributor
timestamp: May 13, 2020, 06:09:35 am
content: You may like the concept of the Synology DS620 slim.Regarding storage troughpu, doing 700 Mb/s for a 5 Watt arm board is really nice.That's on par with a the synology j series.Maybe if you can find a sbc that runs ~2GHz you get better results.

author: Jeroen3
author_rank: Super Contributor
timestamp: May 13, 2020, 06:44:38 am
content: Did you try playing with the mtu to see if it is a packet rate or throughput bottleneck?

author: Jeroen3
author_rank: Super Contributor
timestamp: May 13, 2020, 08:41:08 am
content: So it is a packet rate bottleneck. Then there is not much you can do about it, I think.It needs to figure out what to do with the packets at some moment in the chain.