NAS

When to choose Raspberry Pi (2) and when Banana Pi?

1 6686
tkaiser  
Edited by tkaiser at Wed May 27, 2015 04:10

This short summary is the result of some recently posted nonsense in another subforum here. It's about the use of a SBC as a server with Linux (using it as media center with Android is a totally different story. Same applies to the so called 'Banana Pi M2' which is just an Android toy since Linux support is still very limited at the time of this writing)

To compare both SBCs (single board computers) you always have to have a look at the use case. If it's about many CPU bound applications then RPi 2 might be the better choice, if it's about video/graphics then this is true as well but when it comes to external interconnections (network and/or I/O bandwidth) then Banana Pi/Pro/M1+ or any other SBC based on an A20 SoC (system on chip) will always be the better choice.

1) CPU and DRAM performance.

7zip is a good benchmark to measure combined integer performance and memory throughput: https://s1.hoffart.de/7zip-bench/

Raspberry Pi 2 single core result when overclocked to 1000 MHz is in the range around 480 -- when using the default cpufreq of 700 MHz it's in the range of 415. Banana's 7zip result with 1080 MHz and default DRAM speed is in exactly the same range as a totally overclocked RPi 2: 480. So when you ensure approriate cooling and let an A20 run with 1200 MHz and increase DRAM clock to 480 MHz the A20's single core performance outperforms an RPi 2 easily. Increasing clock speeds and voltages reduces the lifespan of your device and might lead to data corruption. With these cheap SBCs we don't deal with CPUs that have to pass through a QA and selection process (x86 CPUs for example will be tested extensively and based on their capabilities marketed/priced differently afterwards. There might be CPUs that will be sold for a few hundred bucks more as others that were produced on the same wafer). These cheap SoCs will be shipped for a few bucks and unless you do this extensive testing yourself to see where the limits of your SoC/DRAM are you should stay with safe defaults.

If you stay with these defaults then the single core performance of any A20 based board outperforms the one of a RPi 2 a bit. But the RPi 2 has 4 cores whereas the A20 only has 2. So if your use case involves CPU bound applications, you don't depend on network or storage bandwith and you have to serve many concurrent users then the RPi 2 is the better choice.

Important: In the first days of Banana Pi the available OS images where somewhat problematic regarding CPU speed. They used the wrong CPU governor which led to strange performance impacts. When you do not use outdated OS images you won't run into this problem these days and single core CPU performance will always be on par or even better as the one of an RPi depending on overclocking applied or not.

2) Network and I/O bandwidth

The problem with all Raspberry Pis is that their heart (the SoC) is connected to the outside with just one single USB 2.0 connection (capable of 480 Mbps which translates to approx. 30 MB/s maximum if you take protocol overhead, 8b10b encoding and hub operation into account. In reality the transfer rates possible are even lower since USB's BOT mode is inefficient and concurrent accesses block each other).

On the older RPis there is an internal 4-port-hub in use and on the newer ones it's even worse with a 6-port-hub that interconnects the SoC, the 4 USB ports and the integrated Ethernet controller. So if you're dealing with disk or network bound applications then RPi is always the wrong choice since this single USB 2.0 connection will be the bottleneck. It gets even worse when it's about NAS useage since every single bit has to pass the bottleneck twice when it travels from disk to network or vice versa.

If you want to use more than one USB disk with a Raspberry Pi all disks share this limitation so bandwidth does not increase but will always be limited to approx. 30 MB/s and the more disks you try to access concurrently the slower it gets.

Different situation with Banana Pi/Pro/M1+ (or any A20 based board that does not integrate an USB hub): There the SoC has dedicated connections to 3 different USB 2.0 ports, one SATA port (supports port multipliers) and a GBit Ethernet controller that do not have to share bandwidth. The practical limitations of these interfaces are in the following range:

  • USB: approx. 30 MB/s per port
  • SATA: approx. 40/200 MB/s (write/read) without tuning or better (DMA capable) drivers
  • GMAC: maximum network speed varies depending on the kernel and settings in use and the traffic direction between 470 and 940 MBits/sec (350 MB/s on Lamobo R1 at the time of this writing)

When using ports concurrently no bandwidth has to be shared and performance just drops slightly. This is a totally different situation compared to RPis where everything slows down dramatically when two or more ports are used in parallel since there is just one single USB 2.0 connection available between CPU cores and the outside world (one exception: SD card).

BTW: Regarding sequential transfers from/to SD cards the Raspberries have a small performance advantage due to the A20's SD controller being limited to 16.x MB/s whereas a RPi will get close to 23 MB/s (but it's a common mistake to only have a look at sequential read/write speeds since what really matters when an SD card is used for the rootfs is random I/O and there the SD card in question makes the real difference).

3) Camera/Video stuff

If you want to process video from a CSI connected camera or display network video streams then the clear winner is Raspberry Pi since there exists (better) support for hardware accelerated encoding/decoding inside its VideoCore GPU/VPU. Even the older RPis with their single core SoC can easily encode an 1080p@30fps h.264 stream without increasing CPU load noticeably. Maybe this will change sometimes in the future when Allwinner/ARM release source code for Mali/CedarX.

Same applies to the CSI camera available for Banana Pi/Pro/M1+ or Lamobo R1: Currently the driver support for the OmniVision camera module used is very limited (affects autofocus, resolutions and framerates). If you think about video surveillance or display of h.264 streams within Linux: RPi is the better choice -- even the original RPI A/B or B+ with its single core SoC will perform better than any Banana available (due to VPU acceleration accessible from tools like raspivid/omxplayer that totally free up the CPU).

4) Community support and quality of documentation

At the time of this writing Raspberry Pi clearly wins. The situation for Banana Pi/Pro/M1+ (and other Allwinner based boards) will get even worse within the next months when most distro images switch from the outdated sunxi 3.4 kernel to mainline since some things will work differently and most of the available documentation regarding tweaks gets outdated/invalid automatically.

Add post (Wed May 27, 2015 07:47):
Update: According to Olimex Allwinner discontinued the A31/A31s SoCs: https://olimex.wordpress.com/2015/05/18/a31-som-update . Therefore the 'Banana Pi M2' will most likely stay an Android toy forever
I am a foodie person and it is difficult to choose a tasty meal when there are two of your favorite are there to eat. So this trustmypaper.com is beneficial for people like to choose between foods. Raspberry and banana Pi is the one side of the picture but one could get a decision making with respect to food when read this blog.

You have to log in before you can reply Login | Sign Up

Points Rules