Wednesday, 5 November 2014

Banana Pi: Gigabit Ethernet throughput test

Gigabit Ethernet throughput test

I have censored any identifying information about my local network or personal hardware.

Hardware Configuration:

Banana Pi 1024MB of RAM
Inbuilt 10/100/1000 NIC plugged.into router
Top USB port is empty
Bottom USB port is empty.
mini USB OTG (power only)

+---------+           +------+           +----------------+
|Banana pi|-->1Gbps-->|router|->200Mbps->|Remote webserver|
+---------+  Ethernet +------+ Internet  +----------------+
                      1Gbps Ethernet
                 |LAN webserver|

root@bananapi ~ # apt-cache search lsusb 
usbutils - Linux USB utilities
root@bananapi ~ # apt-get install usbutils
root@bananapi ~ # lsusb -t
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=sw-ohci/1p, 12M
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=sw-ehci/1p, 480M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=sw_hcd_host0/1p, 480M
root@bananapi ~ # apt-cache search ethtool
ethtool - display or change Ethernet device settings

root@bananapi ~ # apt-get install ethtool
root@bananapi ~ # ethtool eth0
Settings for eth0:
        Supported ports: [ TP AUI BNC MII FIBRE ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: on
        Current message level: 0x0000003f (63)
                               drv probe link timer ifdown ifup
        Link detected: yes
root@bananapi ~ # netstat -i
Kernel Interface table
eth0       1500 0       950      0      0 0           991      0      0      0 BMRU
lo        16436 0         0      0      0 0             0      0      0      0 LRU
root@bananapi ~ #

Internet Test (via a 200Mbit/sec broadband connection)

Download a single 100MiB file to the Pi through 100Mbps Ethernet and send the downloaded data to /dev/null. This is to focus the test solely on the Ethernet throughput (and USB throughput) and nothing else.

root@bananapi:~# time wget -O /dev/null
--2014-11-05 10:14:24--
Resolving (
Connecting to (||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: `/dev/null'

100%[======================================================================================================================================================================>] 104,857,600 21.8M/s   in 10s

2014-11-05 10:14:34 (9.66 MB/s) - `/dev/null' saved [104857600/104857600]

real    0m10.483s
user    0m0.280s
sys     0m2.380s

LAN Test

Download a single 100MiB file to the Pi through 100Mbps Ethernet and send the downloaded data to /dev/null. The data source is on the Local network from a machine with a 1 Gbit/sec NIC patched directly into the router with the data being read from a RAM disk to maximise read speed.
root@webserver:~# apt-get install nginx nginx-common nginx-full
root@webserver:~# /usr/sbin/nginx &
root@webserver:~# mkdir /usr/share/nginx/www/ramdisk
root@webserver:~# chmod 777 /usr/share/nginx/www/ramdisk
root@webserver:~# free -m
root@webserver:~# mount -t tmpfs -o size=256M tmpfs /usr/share/nginx/www/ramdisk
root@webserver:~# cp speedtest-100MB.bin /usr/share/nginx/www/ramdisk

root@bananapi:~# time wget http://*.*.*.*/ramdisk/speedtest-100MB.bin -O /dev/null
--2014-11-05 10:19:15--  http://
Connecting to
*.*.*.*:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 104857600 (100M) [application/octet-stream]
Saving to: `/dev/null'

100%[======================================>] 104,857,600  109M/s   in 0.9s

2014-11-05 10:21:49 (109 MB/s) - `/dev/null' saved [104857600/104857600]

real    0m0.932s
user    0m0.120s
sys     0m0.720s



Average Internet throughput 9.66MiB/sec - about 13 hops away.
Because this server is so many hops away it's throughput varies wildly with time of day and is effected by so  many uncontrolled fluctuations on every hop in between. This result is more an example of a typical Internet based throughput than a maximum throughput.

Local Area Network

Average LAN throughput  109 MiB/sec (872Mbps) - for 1Gbps this is very close to the maximum throughput. I should probably test again with a much bigger file, but I do not have enough RAM on my server for that.

For every packet there is header information. Source/Destination MAC,  Source/Destination IP,  Source/Destination port, packet length, checksums to check for corruption, etc. (circa 3% of  MTU sized packet) this and packet ACK delays is where the missing 6% overhead has gone. You will never see more than 121.25MiB/sec throughput on a 1Gbps Ethernet card using TCP/IP.

I'm delighted with the LAN Gigabit Ethernet result for the Banana Pi, it blows a Raspberry Pi out of the water. I was half expecting there to be some CPU problem that the hardware could never get anywhere near gigabit, but this hardware totally rocks. Given the choice to buy a RPi model A+/B+ or a Banana Pi/Pro, I'd pick the Banana every time now. 

I have not tested a BeagleBone Black, but it only has 512MB of RAM and 10/100Mbit/sec ethernet. Looking at some benchmarks it looks to me like the Banana Pi/Pro with its two CPU cores may each be over two times as powerful as the single core in the BeagleBone Black. So over four times the performance for multithreaded applications or double the performance for single threaded applications.


  1. Your LAN throughput data is very interesting. I've been playing around with Iperf TCP on 2 BPi cards, and the maximum throughput I'm getting after some TCP tuning is only about 600Mbps. Have you done any Iperf tests on the board?

    1. I'm sorry but I have not used iperf yet, it is something that I have been meaning to look at at some stage. It will be interesting to see what iperf results are achieved using the BPi running some of the tests I found online here ( ). But I only have one BPi board and I'm using it as a server - it is a brilliant piece of hardware, I'm really glad I bought one.

      I'm curious about what TCP tuning did you did, any info or a pointer to URL's you found useful would be good. I always like learning new things.

  2. Sometimes you have to tune the linux buffers to achieve gigabit speeds:

  3. Is ethernet on banana pi same as raspberry pi (work through USB)?

  4. Nope, the board I used was the BananaPi-M1, it and in fact all three boards BananaPi-M2 and the new BananaPi-M3 have dedicated gigabit Ethernet and dedicated USB ports. They all have brilliant throughput performance. The only one thing I don't like about the latest gen of board is the SATA-USB bridge. But if you need SATA even 40MB/sec SATA is better then no SATA.

  5. Curiously with iperf2 between 2 bPis
    directly using udp with -b 1g the max i can achieve is 480 Mbits/sec with just over 2% loss (2.2-2.4)

  6. As far as wireless goes this has not impact. Your wireless speeds are determined by the speed of you "wireless" card. If you have a wireless N card you can get speeds up to 300 megabits per second.

    dedicated fiber internet