RPI4B - slow internet speed with Core 166

  • moderator moved below to a new post.

I also used iperf against a LAN host also for a more accurate test than Ookla speedtest, which is Internet based.

First, test between two hosts on LAN, connected through a TP-Link TL-SX105 10gbase-t switch. Client is Windows 10. Server is Ubuntu. Both using Aquantia AQC-107 NICs. IPFire is not in the picture, this is a direct LAN test.

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c 192.168.1.50
Connecting to host 192.168.1.50, port 5201
[ 5] local 192.168.1.3 port 62223 connected to 192.168.1.50 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 1.11 GBytes 9.50 Gbits/sec
[ 5] 1.00-2.00 sec 1.10 GBytes 9.49 Gbits/sec
[ 5] 2.00-3.00 sec 1.11 GBytes 9.49 Gbits/sec
[ 5] 3.00-4.00 sec 1.11 GBytes 9.49 Gbits/sec
[ 5] 4.00-5.00 sec 1.11 GBytes 9.49 Gbits/sec
[ 5] 5.00-6.00 sec 1.10 GBytes 9.46 Gbits/sec
[ 5] 6.00-7.00 sec 1.11 GBytes 9.49 Gbits/sec
[ 5] 7.00-8.00 sec 1.11 GBytes 9.49 Gbits/sec
[ 5] 8.00-9.00 sec 1.11 GBytes 9.49 Gbits/sec
[ 5] 9.00-10.00 sec 1.11 GBytes 9.49 Gbits/sec


[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 11.0 GBytes 9.49 Gbits/sec sender
[ 5] 0.00-10.00 sec 11.0 GBytes 9.49 Gbits/sec receiver

iperf Done.

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c 192.168.1.50 -R
Connecting to host 192.168.1.50, port 5201
Reverse mode, remote host 192.168.1.50 is sending
[ 5] local 192.168.1.3 port 62283 connected to 192.168.1.50 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 909 MBytes 7.63 Gbits/sec
[ 5] 1.00-2.00 sec 900 MBytes 7.55 Gbits/sec
[ 5] 2.00-3.00 sec 917 MBytes 7.69 Gbits/sec
[ 5] 3.00-4.00 sec 944 MBytes 7.92 Gbits/sec
[ 5] 4.00-5.00 sec 926 MBytes 7.77 Gbits/sec
[ 5] 5.00-6.00 sec 916 MBytes 7.69 Gbits/sec
[ 5] 6.00-7.00 sec 920 MBytes 7.72 Gbits/sec
[ 5] 7.00-8.00 sec 939 MBytes 7.87 Gbits/sec
[ 5] 8.00-9.00 sec 928 MBytes 7.79 Gbits/sec
[ 5] 9.00-10.00 sec 935 MBytes 7.84 Gbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 9.02 GBytes 7.75 Gbits/sec 0 sender
[ 5] 0.00-10.00 sec 9.02 GBytes 7.75 Gbits/sec receiver

iperf Done.

Now, I insert IPFire in between these two hosts. The Pi4B has two Realtek 2.5Gbps wired NICs, one on red, one on green. Server is is on the “red” side, and client is on the “green” side.

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c 192.168.1.50
Connecting to host 192.168.1.50, port 5201
[ 5] local 192.168.2.3 port 57484 connected to 192.168.1.50 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 20.0 MBytes 167 Mbits/sec
[ 5] 1.00-2.00 sec 19.1 MBytes 161 Mbits/sec
[ 5] 2.00-3.01 sec 18.8 MBytes 156 Mbits/sec
[ 5] 3.01-4.00 sec 19.4 MBytes 164 Mbits/sec
[ 5] 4.00-5.00 sec 18.8 MBytes 157 Mbits/sec
[ 5] 5.00-6.01 sec 19.4 MBytes 161 Mbits/sec
[ 5] 6.01-7.00 sec 18.6 MBytes 157 Mbits/sec
[ 5] 7.00-8.01 sec 19.1 MBytes 159 Mbits/sec
[ 5] 8.01-9.01 sec 18.9 MBytes 157 Mbits/sec
[ 5] 9.01-10.01 sec 19.1 MBytes 161 Mbits/sec


[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.01 sec 191 MBytes 160 Mbits/sec sender
[ 5] 0.00-10.03 sec 190 MBytes 159 Mbits/sec receiver

iperf Done.

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c 192.168.1.50 -R
Connecting to host 192.168.1.50, port 5201
Reverse mode, remote host 192.168.1.50 is sending
[ 5] local 192.168.2.3 port 57491 connected to 192.168.1.50 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.01 sec 16.9 MBytes 141 Mbits/sec
[ 5] 1.01-2.00 sec 17.6 MBytes 149 Mbits/sec
[ 5] 2.00-3.00 sec 17.4 MBytes 146 Mbits/sec
[ 5] 3.00-4.00 sec 19.1 MBytes 160 Mbits/sec
[ 5] 4.00-5.00 sec 18.3 MBytes 154 Mbits/sec
[ 5] 5.00-6.00 sec 19.3 MBytes 162 Mbits/sec
[ 5] 6.00-7.00 sec 19.6 MBytes 164 Mbits/sec
[ 5] 7.00-8.00 sec 19.6 MBytes 165 Mbits/sec
[ 5] 8.00-9.00 sec 19.9 MBytes 167 Mbits/sec
[ 5] 9.00-10.00 sec 18.8 MBytes 158 Mbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.03 sec 190 MBytes 159 Mbits/sec 1616 sender
[ 5] 0.00-10.00 sec 187 MBytes 157 Mbits/sec receiver

iperf Done.

C:\Users\Julien Pierre\Desktop\iperf3>

Of course, I didn’t expect miracles - certainly not near 10gig speed of course, since the Pi is using 2.5Gig NICs. The peak I can get in iperf when using the Pi with Raspberry Pi OS 64-bit and a single 2.5 Gps NIC is about 2.3 Gbps, and in one direction only.

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c pi64.local
Connecting to host pi64.local, port 5201
[ 5] local 2601:646:8801:9d00:ec3c:797c:3188:b4c6 port 62515 connected to 2601:646:8801:9d00:53c0:7267:b327:e9c port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 259 MBytes 2.17 Gbits/sec
[ 5] 1.00-2.00 sec 260 MBytes 2.18 Gbits/sec
[ 5] 2.00-3.00 sec 220 MBytes 1.85 Gbits/sec
[ 5] 3.00-4.00 sec 244 MBytes 2.05 Gbits/sec
[ 5] 4.00-5.00 sec 223 MBytes 1.87 Gbits/sec
[ 5] 5.00-6.00 sec 270 MBytes 2.27 Gbits/sec
[ 5] 6.00-7.00 sec 263 MBytes 2.21 Gbits/sec
[ 5] 7.00-8.00 sec 268 MBytes 2.25 Gbits/sec
[ 5] 8.00-9.00 sec 276 MBytes 2.32 Gbits/sec
[ 5] 9.00-10.00 sec 279 MBytes 2.34 Gbits/sec


[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 2.50 GBytes 2.15 Gbits/sec sender
[ 5] 0.00-10.01 sec 2.50 GBytes 2.15 Gbits/sec receiver

iperf Done.

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c pi64.local -R
Connecting to host pi64.local, port 5201
Reverse mode, remote host pi64.local is sending
[ 5] local 2601:646:8801:9d00:ec3c:797c:3188:b4c6 port 62525 connected to 2601:646:8801:9d00:53c0:7267:b327:e9c port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 151 MBytes 1.26 Gbits/sec
[ 5] 1.00-2.00 sec 178 MBytes 1.49 Gbits/sec
[ 5] 2.00-3.00 sec 81.0 MBytes 680 Mbits/sec
[ 5] 3.00-4.00 sec 74.8 MBytes 628 Mbits/sec
[ 5] 4.00-5.00 sec 79.3 MBytes 665 Mbits/sec
[ 5] 5.00-6.00 sec 79.0 MBytes 662 Mbits/sec
[ 5] 6.00-7.00 sec 78.8 MBytes 661 Mbits/sec
[ 5] 7.00-8.00 sec 80.6 MBytes 676 Mbits/sec
[ 5] 8.00-9.00 sec 94.4 MBytes 792 Mbits/sec
[ 5] 9.00-10.00 sec 109 MBytes 911 Mbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1008 MBytes 846 Mbits/sec 122 sender
[ 5] 0.00-10.00 sec 1005 MBytes 843 Mbits/sec receiver

Is 160 Mbps about the most I can expect from IPFire on a Pi4B ?
Is there any tuning that can be done to turn off certain features and get higher than that ?
I was hoping for something higher. I may try other NICs including the built-in Pi NIC. I have many other USB 1gig NICs at my disposal as well.

Responding to myself here - I was able to get a bit more than 160 Mbps throughput with the following combo :

  1. used the built-in Pi4B NIC as the “red” NIC
  2. used the Realtek 2.5Gbps NIC as the “green” NIC

This provided about 200 Mbps of upload throughput, and 300 Mbps of download throughput. A lot better, but I was hoping to get close to gigabit speed if IPFire on the Pi is to be my main Internet router. Perhaps I’m expecting too much of the Pi 4B hardware.

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c 192.168.1.17
Connecting to host 192.168.1.17, port 5201
[ 5] local 192.168.2.3 port 60425 connected to 192.168.1.17 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 23.5 MBytes 197 Mbits/sec
[ 5] 1.00-2.00 sec 23.2 MBytes 195 Mbits/sec
[ 5] 2.00-3.00 sec 23.5 MBytes 196 Mbits/sec
[ 5] 3.00-4.00 sec 23.2 MBytes 196 Mbits/sec
[ 5] 4.00-5.00 sec 23.1 MBytes 194 Mbits/sec
[ 5] 5.00-6.00 sec 23.6 MBytes 198 Mbits/sec
[ 5] 6.00-7.00 sec 23.2 MBytes 195 Mbits/sec
[ 5] 7.00-8.00 sec 23.4 MBytes 196 Mbits/sec
[ 5] 8.00-9.01 sec 23.5 MBytes 197 Mbits/sec
[ 5] 9.01-10.00 sec 23.2 MBytes 195 Mbits/sec


[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 234 MBytes 196 Mbits/sec sender
[ 5] 0.00-10.01 sec 233 MBytes 196 Mbits/sec receiver

iperf Done.

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c 192.168.1.17 -R
Connecting to host 192.168.1.17, port 5201
Reverse mode, remote host 192.168.1.17 is sending
[ 5] local 192.168.2.3 port 60432 connected to 192.168.1.17 port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-1.00 sec 34.1 MBytes 286 Mbits/sec
[ 5] 1.00-2.00 sec 36.9 MBytes 310 Mbits/sec
[ 5] 2.00-3.00 sec 35.2 MBytes 295 Mbits/sec
[ 5] 3.00-4.00 sec 36.3 MBytes 305 Mbits/sec
[ 5] 4.00-5.00 sec 36.9 MBytes 310 Mbits/sec
[ 5] 5.00-6.00 sec 35.1 MBytes 295 Mbits/sec
[ 5] 6.00-7.00 sec 36.9 MBytes 309 Mbits/sec
[ 5] 7.00-8.00 sec 36.0 MBytes 303 Mbits/sec
[ 5] 8.00-9.00 sec 36.3 MBytes 305 Mbits/sec
[ 5] 9.00-10.00 sec 37.2 MBytes 312 Mbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.01 sec 364 MBytes 305 Mbits/sec 0 sender
[ 5] 0.00-10.00 sec 361 MBytes 303 Mbits/sec receiver

iperf Done.

I suspect that you are. While the nic has 1Gbit speed capability, the RPi does not have network hardware that is 100% focussed on the nic. Running the nic is shared with doing cpu work and running the usb etc. So if you have something like IPS running that will load your cpu more then the network speeds will drop.

I don’t know the details of the load sharing in the RPi and how it varies with different load scenarios but how it will suit your requirement as a main internet router depends on your demands on it. Also I doubt very much that the usb on the RPi has been designed to be able to run at Gbit network speeds so I don’t think that your green will get to 1Gbps type speeds even if your usb nic has that capability.

If it is just a firewall without Proxy, IPS, addons then it will probably work OK. The RPi is very good as a portable firewall to take with you to use in hotels or other scenarios like that to provide better protection when you logon with your laptop to check emails etc.

If you require IPFire to run a full IPS, Proxy with URL Filter, OpenVPN server and some additional addons then I believe that you will need to look for better hardware.

1 Like

Adolf,

The Pi4 hardware is capable of >1Gbps speed on a USB NIC. The following is a test from my desktop (with 10gig NIC) against the Pi using the Realtek 2.5G NIC :

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c pi64.local -i 10
Connecting to host pi64.local, port 5201
[ 5] local 2601:646:8801:9d00:445a:8f46:3dfe:c9f6 port 53949 connected to 2601:646:8801:9d00:53c0:7267:b327:e9c port 5201
[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 2.62 GBytes 2.25 Gbits/sec


[ ID] Interval Transfer Bitrate
[ 5] 0.00-10.00 sec 2.62 GBytes 2.25 Gbits/sec sender
[ 5] 0.00-10.01 sec 2.62 GBytes 2.25 Gbits/sec receiver

iperf Done.

C:\Users\Julien Pierre\Desktop\iperf3>iperf3 -c pi64.local -i 10 -R
Connecting to host pi64.local, port 5201
Reverse mode, remote host pi64.local is sending
[ 5] local 2601:646:8801:9d00:445a:8f46:3dfe:c9f6 port 53971 connected to 2601:646:8801:9d00:53c0:7267:b327:e9c port 5201
[ ID] Interval Transfer Bitrate Retr Cwnd
[ 5] 0.00-10.00 sec 1.91 GBytes 1.64 Gbits/sec


[ ID] Interval Transfer Bitrate Retr
[ 5] 0.00-10.00 sec 1.91 GBytes 1.64 Gbits/sec 0 sender
[ 5] 0.00-10.00 sec 1.91 GBytes 1.64 Gbits/sec receiver

iperf Done.

vmstat showed idle CPU of 80% for the first test (upload) and 67% idle for the second test (download).

Of course, that’s just with one NIC, and one direction at a time, ie. half duplex. No routing or firewall, no IPS. Still shows the hardware is capable of >1Gbps networking on USB.

I am new to IPFire so I’m not sure about the default router settings, and whether there is anything that can be turned off to maximize performance, even if it’s at the expense of security, for the purpose of testing.

And to clarify, there are several reasons I’m considering using the Pi with IPFire as my main home router :

  1. the Comcast XB7 router UI is just not able to manage the number of devices I have on my LAN, which are over 100 . So, I want to use it as modem in bridge mode instead.
  2. the Pi 4B consumes little power, even with two USB 2.5G NICs attached, and doesn’t have a fan. A lot of high-performance routers have small fans that spin fast and loudly, which I can’t tolerate.
  3. I already have the hardware lying around to try and experiment with

My home Internet service is 1400 Mbps down / 45 Mbps up, ie. half-duplex.
I know the Pi hardware can handle that throughput on USB with one NIC with iperf3. Not clear it can handle twice that with two NICs, which are required for a router. And of course the firewall/routing part consumes CPU as well. If I could get the IPFire on the Pi4 to perform at close to Gigabit speed, I would be happy. At 200-300 Mbps, that’s leaving too much Internet bandwidth unusable.
If I can’t get more than that, I’ll have to consider using other hardware. Building a PC as router would consume a lot more power, though, and I’m not sure I can build one that’s completely silent or at what cost for this task.

I was having trouble understanding all of your tests above so I created some of my own.

Running iperf3 (3.11) I get ~230 Mbits/sec and this is going through the IPFire box.

example iperf3 Diagram.drawio-2

The laptop on the left side is the ipref3 server. The desktop on the right side is the ipref3 client.


If I do one leg then I see speeds near ~910 Mbits/sec.
The IPFire box becomes the iperf3 server. And the desktop box is the iperf3 client.

I didn’t pay attention too much attention to these results…


Bottom line is the RPi4B is good enough to do an Internet speed of 100 Mbits/sec and maybe 200 Mbits/sec. But I would not use it for anything faster, it is not powerful enough or built to be a speedy router.

2 Likes