Quick iperf question

Guys,

Ive got a vero4k+, and Pi3B+ both running latest stable release of OSMC.both directly wires to gigabit ports on a router.

If I run iperf3 I’m getting about 250-280 mb/s when I run the server from one machine, but only 130-150 when I run the server from the other machine.

Im aware that the pi3B+ won’t come close to gb speeds, so the 250-280 number is probably about right, but Is the difference in the reverse direction normal/expected, or is something not quite right?

Its not the end of the world if this is as expected…as im using the pi3b+ as a cheap and nasty NAS for my 4k rips, and its doing a sterling job so far with no stuttering or buffering, and can keep up with everything in my collection so far…until I’ve saved enough to get hold of a proper Nas.

Cheers

Are you switching server/client or just using -R to do that?
Would be interesting if switching clients make a difference

Also check the interface stats if you see any errors.

You’ll have to forgive me, im quite a novice when it comes to networking.

when I run iperf3 -s from the Vero4k+, and iperf3 -c 192.168.1.24 from the Pi3B+ I get:

276 Mbits/sec

when I run iperf3 -s from the Pi3B+, and iperf3 -c 192.168.1.16 from the Vero4K+ I get:

150 Mbits/sec

How do I check the interface stats mate?

Keep iperf3 -s on Vero and run on the Pi iperf3 -R -c 192.168.1.24 that test reverse direction.

simple one is ifconfig

I get:

[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   160 MBytes   135 Mbits/sec  259             sender
[  4]   0.00-10.00  sec   160 MBytes   135 Mbits/sec                  receiver

ifconfig from vero4k:

eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.1.24  netmask 255.255.255.0  broadcast 192.168.1.255
        ether 06:bd:6d:84:c6:fb  txqueuelen 1000  (Ethernet)
        RX packets 9236836  bytes 13023037749 (12.1 GiB)
        RX errors 0  dropped 27550  overruns 0  frame 0
        TX packets 1885730  bytes 689903805 (657.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 40  

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 4096
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 15117  bytes 1557132 (1.4 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15117  bytes 1557132 (1.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ifconfig from Pi3B+:

eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.1.16  netmask 255.255.255.0  broadcast 192.168.1.255
        ether b8:27:eb:ba:a6:7f  txqueuelen 1000  (Ethernet)
        RX packets 3182746  bytes 3169690580 (2.9 GiB)
        RX errors 0  dropped 23970  overruns 0  frame 0
        TX packets 6721090  bytes 4250355098 (3.9 GiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 5354  bytes 256992 (250.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5354  bytes 256992 (250.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Ok, that proves it is not related to where the server application runs.
Overall I don’t have a reall clue as the “drops” both times on the RX side seems similar.
So can not see a real reason for this.

Thanks for taking a look, hopefully someone else can chime in with possible reasons/solutions.

Am I right in thinking there is something not right though? ie the speeds should be similar in both directions?

Well hard to tell because I am not sure what that dirty hack of putting a GiG Ethernet on a USB port does

Thats true…I suppose it would be useful if someone else who has both devices could run the test and see if the results are similar to mine, it might shine some light on it.

Is there some disk activity during this test?

If so it would lower performance

Sam

Not that I’m aware of Sam, I even tried stopping kodi and all other services I can think of that might be using resources, but it’s the same.

As I said, if this is a limitation then it’s not the end of the world, as it’s working fine for the task it’s intended for, hopefully someone with the same two devices can run the test and see if the results are similar…at least that way I can possibly rule out a problem my end.

Well it does seem that somethings not right, and this is an issue and not a limitation.
According to the results from here :

It would seem that the 150 mb/s speed I’m getting is definitely low.

While it is low it is at least aligned that one direction is slower than the other

Forgive my ignorance, can u explain the significance of that briefly mate?

Well you are getting 276/100 and they got 328/234, so while yes overall your numbers are lower (which also could be impacted by eg the switch) at least it shows the consistency that one direction is slower which the article also comment as " I assume this asymmetry has to do with hardware limitations of the board"

Ah I see, cheers.

I believe we can close the topic, you are definitely not alone
https://www.raspberrypi.org/forums/viewtopic.php?p=1291355#p1289531

So it’s safe to assume the issue is with the pi3b+ hardware itself?

That is how I read the posts on that thread.

An update on this:

After reading through the thread on the Raspberry Pi forum that @fzinken posted, although they admitted there was some sort of issue, something the RPi engineers kept repeating was ‘Make sure that flow control is turned on on your routers/switches’

I checked on my router (basic Sky Q router) and I have no such setting, or if there was I couldn’t find it.

You can check if this is enabled by issuing the command ethtool -a eth0

If flow control is enabled you should get this result:

osmc@osmc: $ ethtool -a eth0

Pause parameters for eth0:

Autonegotiate: on

RX: on

TX: on

RX negotiated: on

TX negotiated: on

I wasn’t getting that result, I was getting this result:

osmc@osmc: $ ethtool -a eth0

Pause parameters for eth0:

Autonegotiate: on

RX: on

TX: on

RX negotiated: off

TX negotiated: off

Which pretty much confirmed my router didn’t have flow control enabled.
After a bit more reading of the thread I read that the vast majority of unmanaged switches will have flow control enabled by default, so I reinstalled the cheap and cheerful linksys unmanaged switch I only removed a few days ago, and after running ethtool -a eth0 again I got the desired result.

…and after running iperf3 again with server on the Vero4k+ and client on the Pi3B+ the result is :

[  4]   0.00-10.00  sec   282 MBytes   237 Mbits/sec   62             sender
[  4]   0.00-10.00  sec   282 MBytes   236 Mbits/sec                  receiver

and with the server on the Pi3B+ and the client on the Vero4K+:

[  4]   0.00-10.00  sec   332 MBytes   279 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   331 MBytes   278 Mbits/sec                  receiver

Which is much closer to what I would expect the results to be.
This one is solved, a crappy basic router was the culprit here.