Jump to content

Banana Pi M1: ethernet speed


pi-rat

Recommended Posts

Hello,

 

What kind of speed can I expect from the ethernet on the BPM1? It's told to be 1Gb/s, but I am not even getting near that speed:

wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.5.tar.xz

...

linux-5.4.5.tar.xz                           100%[==============================================================================================>] 104,37M  4,43MB/s    in 24s     

2019-12-18 22:38:33 (4,35 MB/s) - »linux-5.4.5.tar.xz« gespeichert [109435988/109435988]

BPM1 and the router are set to 1000Mb/s, and the download line works at more then 100Mb/s.

 

Downloading the same file on my PC shows a  considerably difference:

 

linux-5.4.5.tar.xz                           100%[==============================================================================================>] 104,37M  15,4MB/s    in 6,9s    

2019-12-18 22:43:45 (15,2 MB/s) - »linux-5.4.5.tar.xz« gespeichert [109435988/109435988]

 

Is 4MB/s an average speed for the BPM1?

Link to comment
Share on other sites

8 hours ago, pi-rat said:

It's told to be 1Gb/s

 

Use search above. We discusses about M1 Bananas years ago and since hardware hasn't changed, numbers are the same. Theoretical speed is close to 1GB (use iperf to measure, not a download from external servers) but utilisation is something else. Also on protocol level. Even its an old horse, its still better than RPi's 3 "gigabit": https://www.jeffgeerling.com/blogs/jeff-geerling/getting-gigabit-networking

 

 

Link to comment
Share on other sites

Nope the Bpi M1 can do much more, see here :

 

Your test file is not so quick to download :

 

root@minus:~# curl -o /dev/null https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.5.tar.xz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  104M  100  104M    0     0  13.0M      0  0:00:07  0:00:07 --:--:-- 13.4M
root@minus:~# curl -o /dev/null http://test-debit.free.fr/1048576.rnd
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
 32 1024M   32  332M    0     0  93.6M      0  0:00:10  0:00:03  0:00:07 93.6M^C

The slowing factor is often the disk.

Link to comment
Share on other sites

I also did the test with wget (on a SSD) :

 

wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.5.tar.xz
--2019-12-19 09:17:14--  https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.5.tar.xz
Resolving cdn.kernel.org (cdn.kernel.org)... 2a04:4e42:1d::432, 151.101.121.176
Connecting to cdn.kernel.org (cdn.kernel.org)|2a04:4e42:1d::432|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 109435988 (104M) [application/x-xz]
Saving to: ‘linux-5.4.5.tar.xz’

linux-5.4.5.tar.xz                     100%[=========================================================================>] 104,37M  15,1MB/s    in 6,9s

2019-12-19 09:17:21 (15,1 MB/s) - ‘linux-5.4.5.tar.xz’ saved [109435988/109435988]

 

Link to comment
Share on other sites

This is strange. Even if redirect the download to the great void with "wget ... -O /dev/null", making sure that no disk is used, the download speed does not exceed 4MB/s, while my PC downloads exactly the same file with 15MB/s.

 

I tried changing the cables, I tried changing IP, I tried changing the router, but all to no avail. I have no explanation for this behaviour.

Link to comment
Share on other sites

29 minutes ago, pi-rat said:

I have no explanation for this behaviour.

 

Have you update u-boot loader? It's manual procedure -> armbian-config -> system -> install ... / update boot loader.


Manufacturing quality can also be a problem on those cheap boards ... but first start testing network throughput with a correct tool: iperf Then proceed up.

Link to comment
Share on other sites

22 minutes ago, Igor said:

armbian-config -> system -> install ... / update boot loader.

 

The only "install" I see in menu "system" is "Install Desktop". If I select that one, it starts to install the full desktop package.

Link to comment
Share on other sites

I know what this message means. But the system has already been installed to SSD and is running from SSD right now.

 

So, if I understand you correctly, in order to update the boot-loader, I'll have to shut down the system, remove the SSD, boot from SDCard, and then I am to call the command "nand-sata-install" without any SSD attached.

 

Wouldn't that try start the hole set up process again and wouldn't that fail because no SSD has been attached?

 

Also, I don't quite understand, how updating the boot-loader might possible increase the max ethernet speed. This is the file system right now:

 

Filesystem      Size  Used Avail Use% Mounted on
udev            417M     0  417M   0% /dev
tmpfs            97M  6,9M   90M   8% /run
/dev/sda1       108G   27G   76G  27% /
tmpfs           485M     0  485M   0% /dev/shm
tmpfs           5,0M  8,0K  5,0M   1% /run/lock
tmpfs           485M     0  485M   0% /sys/fs/cgroup
tmpfs           485M   48K  485M   1% /tmp
/dev/mmcblk0p1  7,2G  2,3G  4,8G  33% /media/mmcboot
/dev/zram0       49M   22M   24M  49% /var/log
tmpfs            97M  4,0K   97M   1% /run/user/123
tmpfs            97M     0   97M   0% /run/user/1000

 

And this is /boot:

 

drwxr-xr-x  4 root root    4096 Dez 19 23:30 ./
drwxr-xr-x 22 root root    4096 Sep 17 17:26 ../
-rw-r--r--  1 root root       0 Dez 18 22:06 .next
-rw-r--r--  1 root root 3276146 Nov 18 18:39 System.map-4.19.84-sunxi
-rw-r--r--  1 root root     202 Dez 19 23:30 armbianEnv.txt
-rw-r--r--  1 root root       0 Dez 19 21:45 armbianEnv.txt.out
-rw-r--r--  1 root root    1536 Jul  5 19:51 armbian_first_run.txt.template
-rw-r--r--  1 root root    4882 Jul  5 19:51 boot-desktop.png
-rw-r--r--  1 root root  230454 Jul  5 19:51 boot.bmp
-rw-r--r--  1 root root    3726 Dez 18 22:05 boot.cmd
-rw-rw-r--  1 root root    3798 Dez 18 22:05 boot.scr
-rw-r--r--  1 root root  163246 Nov 18 18:39 config-4.19.84-sunxi
lrwxrwxrwx  1 root root      17 Dez 18 22:06 dtb -> dtb-4.19.84-sunxi/
drwxr-xr-x  3 root root   12288 Dez 18 22:05 dtb-4.19.84-sunxi/
lrwxrwxrwx  1 root root      17 Jul  5 19:50 dtb.old -> dtb-4.19.57-sunxi
-rw-r--r--  1 root root 6843382 Dez 19 17:19 initrd.img-4.19.84-sunxi
drwxrwxr-x  2 root root    4096 Jul  5 19:51 overlay-user/
lrwxrwxrwx  1 root root      21 Dez 19 17:19 uInitrd -> uInitrd-4.19.84-sunxi
-rw-r--r--  1 root root 6843446 Dez 19 17:19 uInitrd-4.19.84-sunxi
-rwxr-xr-x  1 root root 7392848 Nov 18 18:39 vmlinuz-4.19.84-sunxi*
lrwxrwxrwx  1 root root      21 Dez 18 22:06 zImage -> vmlinuz-4.19.84-sunxi*

~$ uname -a
Linux pi 4.19.84-sunxi #19.11.3 SMP Mon Nov 18 18:39:42 CET 2019 armv7l GNU/Linux

 

As you can see, the system is running the latest kernel that was installed by armbian-config yesterday. Is it really still necessary to update the boot-loader?

 

I am totally confused now, I really can't see any connection between the boot loader and the slow eth speed. :unsure:

 

Link to comment
Share on other sites

20 hours ago, pi-rat said:

I really can't see any connection between the boot loader and the slow eth speed.


I know it is (do forum search for your education purposes), but I don't know what do you want? Your Banana perform as expected! 

RAW network speed is measured with iperf3 tool. Everything else includes protocol overhead, encryption, compression, ... where M1 will lost a lot since it has slow CPU.

 

On 12/19/2019 at 10:50 AM, pi-rat said:

It's told to be 1Gb/s

 

Adjust your perception with reality and not the other way around ;) Not with information which is presented by hardware manufacturer, sellers and amateur bench-markers.

Link to comment
Share on other sites

14 minutes ago, Igor said:

... but I don't know what do you want?

 

That makes two of us. ;)

 

I was just trying to follow your advice: when I told of the slow download speed and the big difference compared to my PC, you ask me if I had updated the boot loader, and when that did not work, you ask me to run the SSD installation script. So, what are we talking about here?

Link to comment
Share on other sites

3 minutes ago, pi-rat said:

when I told of the slow download speed and the big difference compared to my PC

 

I can only give you few hints while fast scanning what you are saying. Updating everything is most universal hints which solves most of the problems most of the time. Since u-boot update procedure has been moved out from the automatic ... it has to be done manually and if script doesn't work you have to go to manual procedures which are written somewhere in the code.


But it's not u-boot loader. You expected this board will match your PC speed. No it will not. Not even close, but you still can use it for many things. That's it.

Link to comment
Share on other sites

I know I can't compare the BP to my PC, and I don't want to. I am just wondering about this great difference when downloading the same file from the same server. As far as  I know, downloading does not really require much CPU power, and if you redirect the data stream to /dev/null, it is also independent from any block device. I would understand it, if the difference was marginal or if the file came from two different servers or via two different routers or any thing like that.

 

I agree to you, that most probably the reason for this difference in download speed has to be found outside the BP, and that's what I am trying to find out. But, like I told you, I switched the router, I switched the cables, but the difference always stays the same. And that has simply aroused my curiosity.

 

Link to comment
Share on other sites

2 minutes ago, pi-rat said:

I am just wondering about this great difference when downloading the same file from the same server

 

Measure speed between M1 any your PC. Run iperf3 -s (server) on your PC (there are clients for windows, mac, linux) and connect with iperf3 -c your_PC_IP ... then change client and server and report numbers.

Link to comment
Share on other sites

Here are my testing results.

 

1: "iperf -s" was run on the router:

 

a) from PC to router:

root@OpenWrt:~# iperf  -B 1.1.1.1 -s
------------------------------------------------------------
Server listening on TCP port 5001
Binding to local address 1.1.1.1
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 1.1.1.1 port 5001 connected with 1.1.1.2 port 51174
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  1.00 GBytes   859 Mbits/sec

 

b) from BP to router:

root@OpenWrt:~# iperf  -B 1.1.2.1 -s
------------------------------------------------------------
Server listening on TCP port 5001
Binding to local address 1.1.2.1
TCP window size: 85.3 KByte (default)
------------------------------------------------------------

[  4] local 1.1.2.1 port 5001 connected with 1.1.2.2 port 43496
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec   622 MBytes   522 Mbits/sec

 

2: "iperf -s" was run on the BP and on PC:

 

a) from router to PC:

root@pc:~# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size:  128 KByte (default)
------------------------------------------------------------
[  4] local 1.1.1.2 port 5001 connected with 1.1.1.1 port 60463
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  1.07 GBytes   917 Mbits/sec

 

b) from router to BP:

root@bpm:~# iperf -s
------------------------------------------------------------
Server listening on TCP port 5001
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 1.1.2.2 port 5001 connected with 1.1.2.1 port 51657
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec   725 MBytes   607 Mbits/sec

 

The names have been changed to protect the innocent... ;)

 

Unfortunately, iperf3 is not available for OpenWRT. But I hope the differences between the two version will not be too big to spoil the results.

Link to comment
Share on other sites

Everything is normal. I would not bother with a bit lower speed  on one side ... 

Orangepi Win (64bit/2g/faster), since its by accident on my desk:

Iperf to server shows 937 Mbits/sec, other direction 850 Mbits/sec
2G file:
wget from local web server 37.5MB/s (SD card) 
wget from local web server 81.5MB/s (memory)
wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.4.5.tar.xz 54.7MB/s (memory). My dl speed is 500Mbps.

(my desktop and same server via 1Gb network = 104MB/s)

 

Link to comment
Share on other sites

Well, that little difference between my PC and my BP is nothing I bother about. But I am still very curious about what cuts the download speed to half, when both machines download the same source. It feels as if the download server does not really want to give its data to the BP. ;)

 

 

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines