RPi4 routing performance numbers

Well, it seemed like the best available solution for all those poor guys who are in the sad state where they just bought gigabit fiber to their home and now they want to know why their Archer C7 isn't routing it properly :sweat_smile: :nerd_face: :abacus: so I figured if I'm going to recommend it I should test it, and putting up hard tested numbers is more useful than theory. Glad to be helpful, and if anyone chooses to get a Pi4 and can test it under OpenWrt and post some OpenWrt numbers here I'm sure the community would be happy to see those!

EDIT: I also think it provides an interesting perspective on the future of OpenWrt... I personally think that OpenWrt should become more focused on helping people get flexibility and freedom in network design, and less focused on running on low-end hardware with WiFi embedded. If for $90 you can get 4GB of RAM, 32G SD card, Pi4 board, case and power supply, the relevance of fitting into 16MB of flash on an embedded board is far less, but the power of networking freedom for the masses, with security, VPN, DNS over TLS, SQM, keepalived, squid proxy, BATMAN, etc is still just as relevant...


Maybe a Raspberry Pi model will be the future favorite OpenWrt device. But for now what I see is that a Raspberry Pi is not built for and also not optimized for usage as 24/7 low power and easy to use wireless network router or access point.

USB wireless adapters are not the favorite wireless master mode devices from what I can read to date.

Also there are a lot of other options just for wired routing and computing stuff. I see OpenWrt as a wireless router project, often running on cheap mainstream consumer hardware.

1 Like

Yeah the Pi isn't ideal, but the point is that it's possible to get gigabytes of RAM and storage and gigahertz of multicore for under $100. in the future that will be even more so. right now OpenWrt is optimized for something like 16/128 Megabytes of RAM/Storage, using BusyBox and lots of multicall binaries and things. That's not a great assumption going forward.

As it is right now, the top 10 downloads are ALL x86 or RPi

You are refering to https://downloads.openwrt.org/stats/#downloads

The full list shows a different picture (don't ask me why though)


that is particularly odd since this shows yet another picture more similar to the first...


In any case I think there's some evidence that x86 and rpi targets are popular, even if it's mixed. Certainly as costs decline we expect the more powerful things to be more popular as new purchases.

Ok, all, some final numbers I guess... In the end I decided to run the RPi as my main router, in hopes of eventually retiring the j1900 based device I've been using and saving some power consumption and extending the life of my UPS. Also, having my router and my nfs fileserver be one-and-the-same box was causing problems (whenever I needed to do something to the internet... I'd also lose LAN connectivity as my machines would freeze waiting for NFS to come online).

So, my situation is a bit complicated, as I run a squid proxy on the router and use that to do some access controls and identify streams at layer 7 for QoS... meaning the Pi doesn't just have to route a gigabit, but actually proxy a gigabit through squid...

and it does. It's hard to measure a gigabit really because the speed test servers themselves tend not to be able to handle that much speed... but I was able to get upwards of 850Mbps from internet speed tests going through the squid proxy.

Idle percentages were about 1% on one core, and 25% on the 3 other cores. I could probably improve that by telling squid to use only 3 cores... it might not quite handle these speeds under 3 worker conditions... but I honestly don't care. If I get 700+ Mbps and low latency with high QoS that's great, so the fact I can get upwards of 850Mbps with squid is fabulous.

dslreports doesn't work for me anymore because of some certificate issue (the speedtest is ok, but bufferbloat borks)... However I ran mtr to google.com during that speed test and it was rock solid with less than 1 ms of bufferbloat on pings throughout the whole test (note, my pings go through a higher priority queue, I use QoS specifically so I get this kind of result for my high priority stuff, so without DSCP marks etc you wouldn't necessarily get the same result).

nevertheless, the Pi is capable of routing and proxying a gigabit with HFSC shaping all while still having CPU headroom to spare.

EDIT: another advantage to the Pi over an x86 box that does multi-functions is that I can have a micro-SD card ready-to-go with a known working config, and if I screw things up I can easily swap cards and be back to a known good config within minutes... for the x86 setup I have, I'd have to get a screwdriver and open the case :rofl:


@dlakelan, you didn’t use OpenWRT, do you?

I still can’t figure out a way to get the usb Ethernet dongle working.

pretty sure you will need kmod-usb-net-rtl8152 https://openwrt.org/packages/pkgdata/kmod-usb-net-rtl8152

My configuration file is as following:

root@OpenWrt:~# cat /etc/config/network

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr ''
        option netmask ''

config globals 'globals'
        option ula_prefix 'fdbb:54ac:343f::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth0'
        option proto 'static'
        option ipaddr ''
        option netmask ''
        option ip6assign '60'
        option gateway ''
        option dns ''

Problem is, when I tried change the ips to, in order to use the windows network sharing, the RPi 4 didn't get to the WAN through my laptop. So I am still struggling to get the package kmod-usb-net-rtl8152 as you mentioned.

Well, as I run Linux on everything I'd probably just shove the sd card into my laptop or desktop and write the module directly into /root or something... but if you have windows this is less of a possibility. I'm not sure, does the card image include a fat32 partition for such purposes?

otherwise you'd need to change the gateway, dns, and ipaddr but if that didn't work...

next step would be something like use your smart switch to provide lan and wan on port 1 via VLANs.

option ifname 'eth0.1'

for LAN, and eth0.2 for WAN. Make WAN a DHCP client...

make port 8 on your switch untagged for VLAN 2, and plug your ISP device into port 8, plug your pi into port 1... voila you have both LAN and WAN on a single ethernet. at this point you can probably download the package. Then you can reconfigure WAN and reboot.

I do have a Linux machine, perhaps with which I can use to put the package the right place. It would be nice if someone can show me how.

On any relatively recent desktop type linux machine if you slip the card into a cardreader it gets mounted to /media/yourusernamehere/driveIDhere and shows up in nautilus for example. Then you download the module with a web browser, and drag the file from the downloads directory into the appropriate spot on the sd card using nautilus for example. you can put it in /root which is the home directory of the root user.

then you eject the card safely in nautilus, and pull it out and re-plug it into the pi... you boot it up, and then opkg install kmod-usb-net-rtl8152.....ipk

Tried with putting the package in a usb drive, got this:

root@OpenWrt:~# opkg install /mnt/pen/kmod-usb-net-rtl8152_4.19.98-1_aarch64_cor
Installing kmod-usb-net-rtl8152 (4.19.98-1) to root...
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-usb-net-rtl8152:
 *      kmod-usb-net
 * opkg_install_cmd: Cannot install package kmod-usb-net-rtl8152.

I am pretty sure the image of RPi 4 is the same date.

looks like you need a kmod-usb-net generic module as well.

Checked the package directory and found no such 'generic' module.

assuming you're using snapshot, I think it's this: https://downloads.openwrt.org/snapshots/targets/brcm2708/bcm2711/packages/kmod-usb-net_4.19.98-1_aarch64_cortex-a72.ipk

The following modules are needed to install the driver for usb Ethernet dongle:


And yes, I have successfully installed the driver.


So, some more data here... I've had the RPi as my main router on my ATT gigabit GPON link since about 10 days ago. So far absolutely no hiccups at all with the USB NIC or anything like that. It just works very well. It handles the full speed, as well as Squid proxy, it runs nftables flawlessly (on raspbian, still no definitive idea what's up with nftables on OpenWrt... see another thread for that). It does a custom HFSC based QoS, marks packets with DSCP both directions, etc etc.

I put a cheap USB memory stick in and F2FS filesystem on it for logging, to protect the main SD card. Other than that... it's fabulous.


Fully agreed. I'm really thrilled by the power of this little box.

In addition to the routing task my rpi4b runs yate, a sip server.

Yate registers with my sip provider and all in-house ip-phones register with yate on the rpi4b. So yate acts as a client to the sip provider and as a server to the ip-phones. As a side effect I have calls from phone to phone without using my sip provider.

As dlakelan already said: so far absolutely no hiccups at all or anything like that. It just works very well.

Thanks to all developers for this great gift.

Does Pi4 support VLAN’s on both ports in this setup?