Monday, 7 April 2014

Part two: Raspberry Pi WiFi throughput test

Update (2015-02): There
will be little to no change in throughput performance from the new
Raspberry Pi Generation 2 Model B (900MHz quad-core ARM Cortex-A7 BCM2836) over the
older Raspberry Pi Model B+ (700MHz ARM11 BCM2835), since the USB
performance bottleneck is still the LAN9514 USB/Ethernet controller and will not be improved by additional CPU or RAM.

Update (2014-07): There is a new RPi model B+ with 4 USB ports (well 5 in fact when you include ethernet using a LAN9514 chip instead of 3 ports using the LAN9512in the model B). Just to be clear the tests below were done on the model B. If and when Irepeatthe the tests with a model B+ I do not expect to see better performance.

When I looked at the performance of 802.11n I only looked at the highest possible throughput setting that I could setup (In my case a 150Mbps on a TP-LINK WN725N which is software compatible with 8188eu USB Wifi dongle). But not everyone has a 802.11n WiFi adapter, so I decided to run the tests again but this time to force the Wifi to lower performance modes, to see the different throughput rates. This is wireless so my results will differ than anyone else's but they should give a idea of what kind of real world (non-marketing) throughput to expect.

But one thing to remember is that these are maximum throughput rates, since all WiFi data received is being thrown away. If the data was written to an SD card then four other things would need to be factored in: The make and model of the SD card, the read performance of the card; the write performance of the card and most importantly the age of the card. The more writes you do to a SD card the slower it's overall performance becomes, anyhow the initial performance of most SD cards can be found here

The setup is exactly the same as last time. A midrange Linux PC running a nginx webserver serving a 100MiB file from a 256MiB RAM disk. The data flows through a 1Gigabit/sec full duplex NIC to a home cable modem from there it is sent via WiFi to my USB Raspberry Pi WiFi NIC and finally sent to /dev/null to eliminate any SD/harddisk access times. I set the speed on the broadband router to three different settings:
54Mbit/sec = disable 802.11n.

And after setting the channel and speed, I confirmed both had actually changed correctly on the RPi with the iwconfig command. I also download the same 100MiB file 3 times in a row and these are the numbers MiB/second numbers on each row below.

My Wifi router supports four 20MHz channels in the 5GHz band (36, 40, 44, 48 [5.180GHz 5.200GHz 5.220GHz 5.240GHz]) but unfortunately my TP-LINK nano USB WN725N only supports the 2.4GHz band (2.4 ~ 2.4835GHz), so I can't test the throughputs in the 5GHz band. Which is a pity, because higher RF frequency means lower penetration depth into objects, so I would expect less interference at higher frequencies.