[RPi] Measuring RPi Zero USB Network Speed with iperf

As I saw Jeff Geerlings Website and his iperf Benchmarks of different RPis (Link), I wondered how the RPi Zero would perform by using the USB Virtual Ethernet Interface on my Windows 7 x64 PC.

So I got the latest iperf 2 Version (iPerf 2.0.5-3) from the iperf Website at https://iperf.fr/iperf-download.php, installed iperf from the Raspbian Jessie Packages and launched the iperf Server on my Windows 7 x64 PC via iperf -s. The PC was attached to an Gigabit Switch via an Gigabit Ethernet Interface - so no bottleneck here.

Then I started the iperf tests via iperf -c IP -t 20 -i 2.
And these are results:

RPi Modell B Version pre 2
------------------------------------------------------------
Client connecting to 192.168.2.4, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.2.98 port 37217 connected with 192.168.2.4 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.0 sec 13.9 MBytes 58.2 Mbits/sec
[ 3] 2.0- 4.0 sec 13.9 MBytes 58.2 Mbits/sec
[ 3] 4.0- 6.0 sec 13.6 MBytes 57.1 Mbits/sec
[ 3] 6.0- 8.0 sec 14.4 MBytes 60.3 Mbits/sec
[ 3] 8.0-10.0 sec 14.5 MBytes 60.8 Mbits/sec
[ 3] 10.0-12.0 sec 14.6 MBytes 61.3 Mbits/sec
[ 3] 12.0-14.0 sec 14.5 MBytes 60.8 Mbits/sec
[ 3] 14.0-16.0 sec 14.6 MBytes 61.3 Mbits/sec
[ 3] 16.0-18.0 sec 14.5 MBytes 60.8 Mbits/sec
[ 3] 18.0-20.0 sec 14.5 MBytes 60.8 Mbits/sec
[ 3] 0.0-20.0 sec 143 MBytes 60.0 Mbits/sec

60 MBit/s? Well... That is not as good as thought...

RPi Modell B v2
------------------------------------------------------------
Client connecting to 192.168.2.4, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.2.161 port 55453 connected with 192.168.2.4 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.0 sec 14.1 MBytes 59.2 Mbits/sec
[ 3] 2.0- 4.0 sec 14.1 MBytes 59.2 Mbits/sec
[ 3] 4.0- 6.0 sec 14.0 MBytes 58.7 Mbits/sec
[ 3] 6.0- 8.0 sec 14.8 MBytes 61.9 Mbits/sec
[ 3] 8.0-10.0 sec 14.6 MBytes 61.3 Mbits/sec
[ 3] 10.0-12.0 sec 14.6 MBytes 61.3 Mbits/sec
[ 3] 12.0-14.0 sec 14.6 MBytes 61.3 Mbits/sec
[ 3] 14.0-16.0 sec 14.6 MBytes 61.3 Mbits/sec
[ 3] 16.0-18.0 sec 14.5 MBytes 60.8 Mbits/sec
[ 3] 18.0-20.0 sec 14.6 MBytes 61.3 Mbits/sec
[ 3] 0.0-20.0 sec 145 MBytes 60.7 Mbits/sec

60.7 MBit/s - ok, the RPi Modell B v2.0 got double the RAM (512 MB) than the old version - but that did not have impact on the network speed.

RPi 2 Modell B
------------------------------------------------------------
Client connecting to 192.168.2.4, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.2.111 port 38411 connected with 192.168.2.4 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.0 sec 22.6 MBytes 94.9 Mbits/sec
[ 3] 2.0- 4.0 sec 22.4 MBytes 93.8 Mbits/sec
[ 3] 4.0- 6.0 sec 22.5 MBytes 94.4 Mbits/sec
[ 3] 6.0- 8.0 sec 22.5 MBytes 94.4 Mbits/sec
[ 3] 8.0-10.0 sec 22.4 MBytes 93.8 Mbits/sec
[ 3] 10.0-12.0 sec 22.5 MBytes 94.4 Mbits/sec
[ 3] 12.0-14.0 sec 22.4 MBytes 93.8 Mbits/sec
[ 3] 14.0-16.0 sec 22.5 MBytes 94.4 Mbits/sec
[ 3] 16.0-18.0 sec 22.4 MBytes 93.8 Mbits/sec
[ 3] 18.0-20.0 sec 22.5 MBytes 94.4 Mbits/sec
[ 3] 0.0-20.0 sec 225 MBytes 94.2 Mbits/sec

94.2 Mbits/s is a good value, the matches with Jeff ones - so I am feeling a bit better after the bad measurements of the RPi 1 B pre/2.0's...

RPi Zero
------------------------------------------------------------
Client connecting to 192.168.7.1, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.7.2 port 37992 connected with 192.168.7.1 port 5001
[ ID] Interval Transfer Bandwidth
[ 3] 0.0- 2.0 sec 21.9 MBytes 91.8 Mbits/sec
[ 3] 2.0- 4.0 sec 22.1 MBytes 92.8 Mbits/sec
[ 3] 4.0- 6.0 sec 22.2 MBytes 93.3 Mbits/sec
[ 3] 6.0- 8.0 sec 22.1 MBytes 92.8 Mbits/sec
[ 3] 8.0-10.0 sec 22.1 MBytes 92.8 Mbits/sec
[ 3] 10.0-12.0 sec 22.2 MBytes 93.3 Mbits/sec
[ 3] 12.0-14.0 sec 22.2 MBytes 93.3 Mbits/sec
[ 3] 14.0-16.0 sec 22.2 MBytes 93.3 Mbits/sec
[ 3] 16.0-18.0 sec 22.1 MBytes 92.8 Mbits/sec
[ 3] 18.0-20.0 sec 22.2 MBytes 93.3 Mbits/sec
[ 3] 0.0-20.0 sec 222 MBytes 92.9 Mbits/sec

Finally - and that does come in as a surprise: I though the Pi Zero - attached via USB Ethernet would give me any value between some Mbit and some really odd numbers - but it closely matches an really solid 100 MBit Interface - so... Thats cool :)!

[RaspPi] Multiboot with BerryBoot

If you start using Raspberry Pis, you will run out of Sdcards rather quickly. Reason for this is, there are so many awesome Distros you would like to use - that you are becoming something like an Discjokey for Sdcards: An awful load of sdcards with just some 100 MBs of distros - spread all over your desk. And while sdcards are somehow cheaper than they used to be - today - it is still an awful waste of money.

Enter BerryBoot:

BerryBoot is an multiboot OS for Raspberry Pi (1 & 2).
It does use packed (squashfs) Images of different OSes, boots into them by using a shared library base and saves differences onto its own data structure on a second (ext4) partition. Quite cool!

To use Berryboot, just head over to http://www.berryterminal.com/doku.php/berryboot and download your copy.

HOWEVER, there are some caveats:
The CEC function does not work correctly on the current RPi 1 Version - so you can't navigate the menu of BerryBoot or i.e. OpenElec via your TV IR Remote. This seems to be due to a bug in the Raspberry Pi start files. RPi 2 Version does work well... So I tried to mesh the two versions - and it worked in the end. So my receipe is the following:

1.) Download from http://www.berryterminal.com/doku.php/berryboot the berryboot-20140814.zip ( http://downloads.sourceforge.net/project/berryboot/berryboot-20140814.zip ) as well as the berryboot-20150916-pi2-only.zip ( http://downloads.sourceforge.net/project/berryboot/berryboot-20150916-pi2-only.zip ).

a) If you do not yet use berryboot:
2.) Now, format your Sdcard (if you are newly creating a Berryboot System) to fat32.
3.) Unzip all files from the berryboot-20150916-pi2-only.zip to the root of the newly created Sdcard. Then unzip ONLY the kernel_rpi_aufs.img from berryboot-20140814.zip and copy it to the Sdcard.

b) If you own a Berryboot RPi 1 Sdcard and want to upgrade:
2.) Make a backup of your current berryboot sdcard! MANDATORY! Remove all files from the fat32 berryboot partition (the one with the config.txt, start files, etc.)
3.) Unzip all files from the berryboot-20150916-pi2-only.zip to berryboot partition. Then unzip ONLY the kernel_rpi_aufs.img from berryboot-20140814.zip and copy it to the Sdcard.

If you want to decide which image should be booted "on boot":
Just create on the berryboot data partition in /data/ an textfile named "default" and enter which image should be loaded, i.e.: OpenELEC_6.0.0.img128
There should also be an default_bootonce or so called file which does only boot on the next boot up - but i have not tried that.
With that knowledge, you could mount the berryboot data file from an booted image and change - while beeing in the system - the next bootimage via commandline.
Neat :)?