Extremely slow Ethernet on A20-OLinuXino-LIME2

Started by StupidBeard, July 16, 2015, 10:01:57 PM

Previous topic - Next topic

Rainer

I tested 2 A20-SOM board we received last week with the original kernel (3.4.103) and a buildroot filesystem.
Test with UDP seams be ok but with TCP and scp by 1000 Mbit the performace ist not ok.
After switching to 100Mbit the performance seams to be ok.

iperf -c 192.168.99.2 -u -b 1000m
------------------------------------------------------------
Client connecting to 192.168.99.2, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  160 KByte (default)
------------------------------------------------------------
[  3] local 192.168.99.179 port 33871 connected with 192.168.99.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec   592 MBytes   497 Mbits/sec
[  3] Sent 422564 datagrams
[  3] Server Report:
[  3]  0.0-10.0 sec   592 MBytes   497 Mbits/sec   0.040 ms    0/422563 (0%)

iperf -c 192.168.99.2
------------------------------------------------------------
Client connecting to 192.168.99.2, TCP port 5001
TCP window size: 21.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.99.106 port 41114 connected with 192.168.99.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-33.6 sec  1.63 MBytes   406 Kbits/sec

mii-diag  eth0 -F 100baseTx-FD
iperf -c 192.168.99.2
------------------------------------------------------------
Client connecting to 192.168.99.2, TCP port 5001
TCP window size: 21.0 KByte (default)
------------------------------------------------------------
[  3] local 192.168.99.106 port 41115 connected with 192.168.99.2 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-10.0 sec  58.4 MBytes  48.9 Mbits/sec

soenke

well, that is not good...

Can you check your interface statistics for broken/dropped RX/TX packets? The same on the target machine.

dario

According to the following post, the problem is shared among many other boards based on A20: http://forum.armbian.com/index.php/topic/31-problems-with-gigabit/

infertux

#33
Same problem here, I'm hovering at 15kB/s in gigabit mode whereas I easily reach 11MB/s in 100 Mbit mode.

I've added this in my /etc/network/interfaces as a temporary workaround:


auto eth0
iface eth0 inet static
  [...]
  up mii-tool -F 100baseTx-FD eth0


Kernel: 4.4.1-sunxi

fallenguru

Same here.

~40 KiB/s on average over a supposed Gigabit connection.

It's not the SD card, I've tried three, one a brand new Samsung Pro. There are no errors in dmesg, SD-related or otherwise. That's on vanilla Debian stretch as of today, using 4.3.0's stmmac. The network behaves as expected when forced down to 100Mb/s. (Which is not an acceptable workaround long-term because I bought the LIME2 especially for its Gbit interface.)

fradav

Quote from: fallenguru on March 10, 2016, 10:03:14 PM
Same here.

~40 KiB/s on average over a supposed Gigabit connection.

It's not the SD card, I've tried three, one a brand new Samsung Pro. There are no errors in dmesg, SD-related or otherwise. That's on vanilla Debian stretch as of today, using 4.3.0's stmmac. The network behaves as expected when forced down to 100Mb/s. (Which is not an acceptable workaround long-term because I bought the LIME2 especially for its Gbit interface.)

Same here, too, joining the pack of disgruntled "native gigabit" users.
I think the potential is there, because when I use a relatively fast usb3/ethernet adapter to my main pc and plug the lime2 to it, after the first disconnect/reconnect the gigabit speed is really there. But going back to a "normal" switch and the lime2 is reverting to the old PSTN modem speed-land.

I guess something is really going on at PHY level but I don't get it (and twiddling GMAC_TX_DELAY in uboot didn't change anything)...
If someone can confirm than he gets real gigabit speed with the lime2, please post your results, and what did you use as uboot/kernel...

Regards

JohnS


fallenguru

Olimex support say it "works with some switches/routers and [...] not [...] with others" -- has *anyone* had success with the LIME2 connected to a Gigabit switch at 1000 Mb/s full duplex? Meaning no packet loss and acceptable bandwidth (say >500Mb/s) in both directions? If so please post the make & model of the switch. Maybe incompatible switches would also be useful.

(You can use ping and iperf3 to measure.)

I'll start and say that the Zyxel GS1900 series does NOT work.

olHelp

Just testet my Lime2 against the openWRT router it is wired to.
iperf -c on the router, and iperf -c on the lime gives ~250Mbit/sek. COuld be more, but the measly MIPS cpu in the router is at 100%.

Other way around only gives 120Mbit/sek, but again with 100%load on the router. 

Dont have any wired deviced to test, but pinging the lime at the same time from antoher computer returns all pings in the expected timeframe, no losses.

kernel is 4.4.3-1-ARCH

fradav

Quote from: olHelp on March 12, 2016, 05:00:32 PM
Just testet my Lime2 against the openWRT router it is wired to.
iperf -c on the router, and iperf -c on the lime gives ~250Mbit/sek. COuld be more, but the measly MIPS cpu in the router is at 100%.

Other way around only gives 120Mbit/sek, but again with 100%load on the router. 

Dont have any wired deviced to test, but pinging the lime at the same time from antoher computer returns all pings in the expected timeframe, no losses.

kernel is 4.4.3-1-ARCH

Hi,

Self compiled kernel or not ? Do you know Which distro? uboot ?

Regards

olHelp

No frills arch linux installation, running from sd card

dancri77

#41
I have the same issue. I run the test between an Intel machine running linux, with gigabit ethernet, and Lime2.
My switch is a 24-port gigabit. Clearly no problem with my network equipment or cables as I have several PCs in my network with gigabit links working OK.

I run the Vanilla Jessie image from http://www.armbian.com/olimex-lime-2/.

DOWNLINK seems fine, getting max 701 Mbits/sec. See below.
UPLINK is terrible, avg. is 3 Mbits/s.

-------------------DOWNLINK------------------------------------
root@lime2:~# iperf3 -c 192.168.0.11
Connecting to host 192.168.0.11, port 5201
[  4] local 192.168.0.27 port 58414 connected to 192.168.0.11 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  59.1 MBytes   495 Mbits/sec    0    204 KBytes
[  4]   1.00-2.02   sec  69.5 MBytes   575 Mbits/sec    0    335 KBytes
[  4]   2.02-3.00   sec  65.4 MBytes   557 Mbits/sec    0    506 KBytes
[  4]   3.00-4.02   sec  65.5 MBytes   541 Mbits/sec    0    765 KBytes
[  4]   4.02-5.00   sec  77.5 MBytes   660 Mbits/sec    0    765 KBytes
[  4]   5.00-6.00   sec  79.6 MBytes   666 Mbits/sec    0   1.02 MBytes
[  4]   6.00-7.00   sec  81.2 MBytes   683 Mbits/sec    0   1.33 MBytes
[  4]   7.00-8.01   sec  78.8 MBytes   656 Mbits/sec    0   1.33 MBytes
[  4]   8.01-9.00   sec  77.5 MBytes   653 Mbits/sec    0   1.50 MBytes
[  4]   9.00-10.01  sec  83.8 MBytes   701 Mbits/sec    0   1.50 MBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.01  sec   738 MBytes   619 Mbits/sec    0             sender
[  4]   0.00-10.01  sec   738 MBytes   619 Mbits/sec                  receiver

--------------------UPLINK------------------------------------------------

root@lime2:~# iperf3 -c 192.168.0.11 -R
Connecting to host 192.168.0.11, port 5201
Reverse mode, remote host 192.168.0.11 is sending
[  4] local 192.168.0.27 port 58418 connected to 192.168.0.11 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec   650 KBytes  5.33 Mbits/sec
[  4]   1.00-2.00   sec   431 KBytes  3.53 Mbits/sec
[  4]   2.00-3.00   sec   291 KBytes  2.39 Mbits/sec
[  4]   3.00-4.00   sec   505 KBytes  4.14 Mbits/sec
[  4]   4.00-5.00   sec   535 KBytes  4.38 Mbits/sec
[  4]   5.00-6.00   sec   240 KBytes  1.97 Mbits/sec
[  4]   6.00-7.00   sec   181 KBytes  1.48 Mbits/sec
[  4]   7.00-8.00   sec  77.8 KBytes   637 Kbits/sec
[  4]   8.00-9.00   sec   573 KBytes  4.69 Mbits/sec
[  4]   9.00-10.00  sec   216 KBytes  1.77 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  3.63 MBytes  3.05 Mbits/sec  373             sender
[  4]   0.00-10.00  sec  3.61 MBytes  3.03 Mbits/sec                  receiver

dancri77

Changing the eth0 interface speed to 100 mbit gives stable 94 Mbit/s rate in both direction.

ethtool -s eth0 speed 100 duplex full

root@lime2:~# iperf3 -c 192.168.0.9 -R
Connecting to host 192.168.0.9, port 5201
Reverse mode, remote host 192.168.0.9 is sending
[  4] local 192.168.0.27 port 52488 connected to 192.168.0.9 port 5201
[ ID] Interval           Transfer     Bandwidth
[  4]   0.00-1.00   sec  11.3 MBytes  94.5 Mbits/sec
[  4]   1.00-2.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   2.00-3.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   3.00-4.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   4.00-5.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   5.00-6.00   sec  11.2 MBytes  93.9 Mbits/sec
[  4]   6.00-7.00   sec  11.2 MBytes  94.0 Mbits/sec
[  4]   7.00-8.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   8.00-9.00   sec  11.2 MBytes  94.1 Mbits/sec
[  4]   9.00-10.00  sec  11.2 MBytes  94.1 Mbits/sec
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   112 MBytes  94.2 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   112 MBytes  94.2 Mbits/sec                  receiver



root@lime2:~# iperf3 -c 192.168.0.9
Connecting to host 192.168.0.9, port 5201
[  4] local 192.168.0.27 port 52484 connected to 192.168.0.9 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  11.4 MBytes  95.7 Mbits/sec    0    219 KBytes
[  4]   1.00-2.00   sec  11.2 MBytes  94.4 Mbits/sec    0    236 KBytes
[  4]   2.00-3.00   sec  11.1 MBytes  93.3 Mbits/sec    0    246 KBytes
[  4]   3.00-4.00   sec  11.5 MBytes  96.4 Mbits/sec    0    263 KBytes
[  4]   4.00-5.00   sec  11.0 MBytes  92.3 Mbits/sec    0    263 KBytes
[  4]   5.00-6.00   sec  11.3 MBytes  94.9 Mbits/sec    0    263 KBytes
[  4]   6.00-7.00   sec  11.2 MBytes  93.8 Mbits/sec    0    263 KBytes
[  4]   7.00-8.00   sec  11.4 MBytes  95.4 Mbits/sec    0    263 KBytes
[  4]   8.00-9.00   sec  11.0 MBytes  92.3 Mbits/sec    0    263 KBytes
[  4]   9.00-10.00  sec  11.7 MBytes  98.5 Mbits/sec    0    413 KBytes
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec   113 MBytes  94.7 Mbits/sec    0             sender
[  4]   0.00-10.00  sec   112 MBytes  93.9 Mbits/sec                  receiver



fallenguru

No change with an old dumb 3Com OfficeConnect Gigabit Switch 8. The kernel doesn't make a difference either, I've tried the legacy sunxi one and the 4.4 that's in Debian testing.

dario

#44
Some work was done. There is a patch for U-Boot here: https://github.com/OLIMEX/OLINUXINO/issues/31

I have personally tested the patch posted there. It works pretty good!