03-04-2016, 11:45 AM
So I've spent some time running tests on the Gb ethernet and am getting some odd results. While it is possible to get 600Mbps throughput, it's also possible to get just 400:
Huh? Looks like there's something in the GMAC device or the PHY that's not being set properly (resetting the eth0 device appears to power-cycle the PHY, if the LEDs are any indication). Note that this is pretty hard to reproduce -- 9 out of 10 times the throughput doesn't change. Also, the ethernet controller doesn't always come up in the faster mode; again, it is somewhat random but skews towards the higher-speed mode.
I was able to rule out thermal throttling here, as this test can take a couple of minutes to push the SoC's temperature to the point where the CPU speed drops to 1.1GHz, and even then, the throughput only falls to around 580Mbps.
Code:
[localhost.localdomain]/root: iperf -c 192.168.2.1 -t 300 -i 10 -P 1
------------------------------------------------------------
Client connecting to 192.168.2.1, TCP port 5001
TCP window size: 49.6 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.2.2 port 44710 connected with 192.168.2.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 712 MBytes 597 Mbits/sec
[ 3] 10.0-20.0 sec 716 MBytes 600 Mbits/sec
[ 3] 20.0-30.0 sec 716 MBytes 600 Mbits/sec
[ 3] 30.0-40.0 sec 716 MBytes 600 Mbits/sec
[ 3] 40.0-50.0 sec 716 MBytes 600 Mbits/sec
[ 3] 50.0-60.0 sec 710 MBytes 595 Mbits/sec
... looks okay
[localhost.localdomain]/root: ifconfig eth0 down
[localhost.localdomain]/root: ifconfig eth0 up
[localhost.localdomain]/root: ifconfig eth0 192.168.2.2
[localhost.localdomain]/root: iperf -c 192.168.2.1 -t 300 -i 10 -P 1
------------------------------------------------------------
Client connecting to 192.168.2.1, TCP port 5001
TCP window size: 90.2 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.2.2 port 44711 connected with 192.168.2.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0-10.0 sec 465 MBytes 390 Mbits/sec
[ 3] 10.0-20.0 sec 467 MBytes 392 Mbits/sec
[ 3] 20.0-30.0 sec 466 MBytes 391 Mbits/sec
[ 3] 30.0-40.0 sec 467 MBytes 392 Mbits/sec
[ 3] 40.0-50.0 sec 467 MBytes 392 Mbits/sec
[ 3] 50.0-60.0 sec 467 MBytes 392 Mbits/sec
[ 3] 60.0-70.0 sec 467 MBytes 392 Mbits/sec
[ 3] 70.0-80.0 sec 467 MBytes 392 Mbits/sec
[ 3] 80.0-90.0 sec 467 MBytes 392 Mbits/sec
...
Huh? Looks like there's something in the GMAC device or the PHY that's not being set properly (resetting the eth0 device appears to power-cycle the PHY, if the LEDs are any indication). Note that this is pretty hard to reproduce -- 9 out of 10 times the throughput doesn't change. Also, the ethernet controller doesn't always come up in the faster mode; again, it is somewhat random but skews towards the higher-speed mode.
I was able to rule out thermal throttling here, as this test can take a couple of minutes to push the SoC's temperature to the point where the CPU speed drops to 1.1GHz, and even then, the throughput only falls to around 580Mbps.