RPi4 router, slow speeds. How to diagnose?

Trying to build a RPi4 OpenWrt router. LAN is connected to the hardwired NIC; WAN is via a USB3 NIC dongle (rtl8152 driver)

wired connection speed testing is topping out at 100mbps which seems too coincidental so i'm thinking there's something wrong in the configuration that is having the WAN or the LAN being treated as a 100mbps NIC and not a gigabit NIC?

but maybe not? is there something "more" i need to do after getting luci installed and the router up and running to finish RPi4 set-up as a router, or, if not, how should I try troubleshooting this.

Version of OpenWrt? Does iperf3 show similar performance? What does the NIC(s) report as linkspeed?

(sorry, relative noob here)

version is most current Snapshot (i feebly built up the package myself using a guide online)

don't know what iperf3 is. edit: ok, i installed the package through LuCi. but i don't know the syntax to test it. edit2: ok, i got it running and tried an external test; shows slow bandwidths. edit3: ok, ran iperf3 as a server on the router connected to it as a client to run a test on the LAN... showing 900+ mbps.

how can I see what the NIC is reporting? (i had tried the ethernet dongle in my windows PC and it showed as a gbps)

ok did a little bit of poking around.

Version of openwrt = snapshot
iperf3 results = similarly slow bandwidth to internet; 900+ mbps on LAN
i don't know how to find what the NIC reports as a linkspeed though

Pull the ethernet cable, and reinsert it.

Run dmesg immediately afterwards.

which ethernet? to WAN?

Yes to WAN. And maybe switch to a different Ethernet cable yours might not be a gigabit capable cable.

Have you connected the dongle on the USB2 or USB3 connector on the RaspberryPi?

Because 100Mbit/s is very similar to RaspberryPi 3B and older versions where the ethernet connector shared hardware bus with USB2 and the “gigabit” connector only had 100Mbit/s available. In RaspberryPi 4B we got a real gigabit ethernet circuit.

3 Likes

Yep. I double checked that one earlier on :wink:

Here's something new: I power-cycled my modem and speedtest went from ~30mbps to 180-220mbps on wireless.

Wired is still topping out at around 100mbps on all connections, though.

1 Like

Since RaspberryPi is SD card based. Have you tried to make a RaspianOS SD card and measured the network USB dongle speed with original RaspberryPi OS to see what the hardware actuall performance is?

...or just install ethtool? :slight_smile:

1 Like

your issue is not related to the pi

I have very similar setup apart from my USB adaptor is a D-Link device and uses the ASIX AX88179 driver. As said above install ethtool either from LuCI or commad line then run the ethtool command

root@Pi-Router:~# ethtool eth1
Settings for eth1:
	Supported ports: [ TP MII ]
	Supported link modes:   10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Half 1000baseT/Full 
	Supported pause frame use: No
	Supports auto-negotiation: Yes
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full 
	                        100baseT/Half 100baseT/Full 
	                        1000baseT/Full 
	Advertised pause frame use: Symmetric
	Advertised auto-negotiation: Yes
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  10baseT/Half 10baseT/Full 
	                                     100baseT/Half 100baseT/Full 
	                                     1000baseT/Full 
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 1000Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 3
	Transceiver: internal
	Auto-negotiation: on
	Supports Wake-on: pg
	Wake-on: g
	Current message level: 0x00000007 (7)
			       drv probe link
	Link detected: yes

That will list the link speed.

It looks like it's negotiating gigabit so it's not just a cable or similar

I once had this issue where wireless was doing better. Disable eee (with ethtool) for both physical ports and try again. For good measure add dtparam=eee=off to /boot/config.txt to disable eee on eth0 at boot.

ok i tried that. it made my wifi marginally faster actually but still slow speeds on wired.

i did some troubleshooting/problem locating:

directly connecting computer to cable modem via ethernet = getting 500mbps (close enough to my paid-for speeds since I recognize faster speeds tend to get increasingly sensitive to EM conditions)

directly connecting computer to cable modem via the USB NIC I use on the Pi... getting 400+mbps

So... I think I've narrowed this down to either a limitation of the Pi router, or some aberrant configuration setting?

Have you installed irqbalance? At those speeds balancing irqs would certainly help to boost performance. Install it and enable it in the /etc/config/ file.

trying that now. (do i enable it by switching 0 to 1 in the config?)

Yes, then restart the service.

done. no effect.