My Raspberry Pi Cluster – With a Banana Pi head Node.

I built my Raspberry Pi Cluster a year ago, but never got round to writing about it.   Lots of people have built their own clusters and mine is in many ways similar to theirs. But there a few differences and these are what I’m going to cover here.

Firstly the Raspberry Pi SBC has a number of shortcomings when used in a cluster, I set out to mitigate them.   These are :-

100 BaseT network
USB and Network share the same underlying bus
No easy way to provide fast storage
SD card which are apt to fail

These limitations are most keenly felt with the cluster’s head node, ie the one controlling it all.   My approach was to use a Banana Pi.   The banana Pi has two 1Ghz cores, 1GB of Ram, Gigabit and a SATA connection.  The SATA port allows connection to the SSD, the Gigabit connections let multiple raspberries run at full network speed simultaneously.  The Banana Pi seems to top out at 450 Mbit’s.   Performance of the SSD on the Banana Pi is also pretty lacklustre I believe there is a problem with the underlying driver.   Even so it’s obvious that this represents a serious improvement over a normal Raspberry cluster and is more than enough to produce a performant one.

The complete spec for the cluster is

8 port Gigabit switch (TrendNet Green Switch)
7 port USB 3 hub
96GB Kingstone SSD
5 Quad core raspberry Pi 2’s
1 Banana Pi

The operation of the cluster is as follows the Banana runs NFS and it uses the SSD to provide the filesystems for the raspberries, each has their own on the SD card to boot from.   The boot partition on the SD card sets up the machine and mounts the root filesystem over NFS.   NFS is setup as efficiently as possible so the systems perform well (big rw buffers, UDP etc).  The use of Raspberry Pi 2’s also makes the cluster far more powerful than most other Raspberry Clusters, which are usually based upon ordinary Raspberries.   I have experimented with RPI3’s but find they are very particular about power, the USB Hub doesn’t provide enough and they are not reliable if insufficient power is supplied.   Even with these I’m pushing my luck and I switch off every thing I don’t need, to reduce the power drawn by each Pi.

For me at least the Raspberry Pi 2 is the best power performance compromise

The Raspberry Pi Cluster housing (possibly over selling by calling it a housing) consists of two bits of wood,  HMDI connectors being glued into the wood to mount the computers.   Plumbing pipe is used to make the structure two tiers.   At one end is the SSD and at the other is a gigabit switch.   This low power and is powered from the USB 3 Hub.   Every expense spared! There are therefore just two connections out from the cluster 1 ethernet and one power.

Pictures will make this clearer.

Below you can see the two bits of wood joined together with plumbing pipe the USB hub screwed to the top, the switch at one and the SSD at the other the 5 Raspberries and 1 Banana Pi are on either side.  Note USB to power Barrel connector, this powers the gigabit switch.

The disassembled cluster
The disassembled cluster

The picture below is end on showing SSD and Sata connections.

20161109_185530

Here is my Raspberry Pi cluster in it complete form!  (I call it PipSqueak)

This is the PipSqueak
This is the PipSqueak

The 5 Pi 2’s are on the bottom plugin via their HMDI socket, the Banana Pi is on top also plugged in via HMDI.