sohojmanush
Posts: 7
Joined: Fri Apr 02, 2021 5:03 pm

Rpi 4 slow connection speed in iperf3.

Sat Jul 17, 2021 3:40 am

I have two subnets in my router. 1st one is 192.168.88.xx(ether1-ether4) and the second one is 192.168.188.xx (ether5). My rpi 4 is connected to the 2nd subnet (192.168.188.xx). All of my devices are connected through a gigabit ethernet cable. But, when I ran iperf3 from subnet1 to subnet 2, the connection speed dropped to 100Mbps. So, I swapped another computer into subnet2 and the rpi 4 into subnet1. Both, devices showed 1Gbps speed in iperf3. But, when I reconnect my rpi 4 into the subnet2 again it connection speed dropped to 100Mbps. Though, on the router connection speed shows that rpi 4 in subnet2 has 1Gbps speed. So, how can I get the full speed in rpi 4?

LTolledo
Posts: 5814
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Rpi 4 slow connection speed in iperf3.

Sat Jul 17, 2021 6:33 am

based on your statements, there is nothing wrong with your RPi as it reports 1Gbps at your subnet1

check your network infrastructure again, and again...
you may need to change cables and/or router...
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

Malvineous
Posts: 59
Joined: Wed Mar 07, 2012 10:31 am
Contact: Website

Re: Rpi 4 slow connection speed in iperf3.

Sat Jul 17, 2021 4:04 pm

How old/expensive is your router? If it's doing full routing between subnets (rather than bridging) then unless it's a fairly high-end model by 2021 standards, it probably can't route at gigabit speeds. Try putting both devices on the same subnet so there is no router then try your speed tests. That will confirm whether the Pi or the router is the bottleneck.

sohojmanush
Posts: 7
Joined: Fri Apr 02, 2021 5:03 pm

Re: Rpi 4 slow connection speed in iperf3.

Sun Jul 18, 2021 4:24 pm

Thank you, from what you guys saying seems like a router issue. Its mikrotik hap ac. At first, I thought its a router issue, but the confusing part is that my iperf3 server is always on subnet1. And the rpi 4 is on subnet2. So, I removed rpi 4 from the subet2 and added another computer in subnet2. That new computer from subnet2 communicated to subnet1 at gigabit speed. Speed always fall for the rpi 4 on subnet2. For the cable part, my router has an option that showed the cable working at gigabit speed.

sohojmanush
Posts: 7
Joined: Fri Apr 02, 2021 5:03 pm

Re: Rpi 4 slow connection speed in iperf3.

Sat Jul 24, 2021 2:34 pm

Update: Found out the issue. The cable and router were working fine. The issue is with wifi and ethernet being on two different subnets. The wifi is at 192.168.88.xx and the ethernet is at 192.168.188.xx. Disabling the wifi resolve the issue, but it will be nice if I can keep the wifi-enabled on a different subnet.

Malvineous
Posts: 59
Joined: Wed Mar 07, 2012 10:31 am
Contact: Website

Re: Rpi 4 slow connection speed in iperf3.

Sun Jul 25, 2021 3:10 am

You didn't mention Wifi in your original post - without all the details it is impossible to give you accurate advice and we will just keep guessing and will probably be wrong.

If you want to use two different subnets then you will need a router to move traffic between them. This router will need a CPU fast enough to handle the traffic as a router (unlike a switch) must inspect each packet and decide where to send it. If you are only seeing a speed drop when routing between the subnets (and not on the same subnet where an internally hardware accelerated switch chip is used) then it means the CPU in your router is not powerful enough to handle the traffic.

The only solution, if you want to keep the two subnets, is to buy a more powerful router. Look for one that is advertised as being able to handle a gigabit Internet connection. Most consumer routers max out at around 100 Mbps and the ones that can go higher are very expensive as few people today have Internet connections that fast. I recently had this problem and switched from a router to a six year old Dell server I found in an e-waste bin and it can handle 10 gigabit routing while it's practically idle (0.7% CPU). But at 70 watts it uses almost 10 times as much electricity as a normal home router so the performance comes at a cost.

sohojmanush
Posts: 7
Joined: Fri Apr 02, 2021 5:03 pm

Re: Rpi 4 slow connection speed in iperf3.

Mon Jul 26, 2021 6:10 am

Thank you for the reply. Sorry, for not mentioning the wifi. I found out that after I turned off the wifi on RPI. My router is not quite actually a consumer router, it's a mikrotik hAP AC. And I kept the wifi on RPI as failsafe ssh access. I did turn off the wifi on the router before running iperf. But, the speed only reaches gigabit when I turn off the wifi on the RPI. I will keep the wifi off on RPI from now on.

Return to “Troubleshooting”