Build your own inexpensive super-computing cluster with Raspberry Pi 3's

; Date: Sun Apr 15 2018

Tags: Raspberry Pi »»»» Raspberry Pi Zero »»»» Cluster Computing

Want a cheap super-computer farm? A Raspberry Pi cluster can pack a lot of computing power into a small space at low energy consumption. Single-board-computers like the Raspberry Pi 3 are inexpensive, consume a miniscule amount of power, run Linux making them instantly accessible by all programmers, and support all kinds of computing tasks, including supercomputing. The Raspberry Pi's themselves run off a USB power supply you might otherwise use to charge cell phones. Simply stack a bunch of them up, wire them to an ethernet switch, and you have a computing cluster on the cheap.

Let's look at an example Raspberry Pi cluster project. The overall architecture is shown above, and some videos are below.

With careful choice of components it's possible to power the whole system off a USB charger that you'd use for charging cell phones. That means you have N Raspberry Pi's, plus N ethernet cords and N USB cords and N SD cards. N is probably going to equal 8, because the Pi's will be connected to an ethernet switch, and most switches have 8 ports.

As it says in the image, one of the Pi's is set aside to serve as a router. It will have a NAT gateway configured, and a DHCP server to assign IP addresses. The Pi's will therefore be on a private network, and any traffic between the Pi's will not affect your home network.

Suggested parts are:

Raspberry Pi 3 Model B Motherboard
Raspberry Pi 3 Model B Motherboard:
Samsung 16GB up to 48MB/s EVO Class 10 Micro SDHC Card with Adapter (MB-MP16DA/AM)
Samsung 16GB up to 48MB/s EVO Class 10 Micro SDHC Card with Adapter (MB-MP16DA/AM):
TRENDnet 8-Port Unmanaged 10/100 Mbps GREENnet Ethernet Desktop Plastic Housing Switch,TE100-S8
TRENDnet 8-Port Unmanaged 10/100 Mbps GREENnet Ethernet Desktop Plastic Housing Switch,TE100-S8:
iMBAPrice 1' Cat5e Network Ethernet Patch Cable, 10 Pack, Black (IMBA-CAT5-01BK-10PK)
iMBAPrice 1' Cat5e Network Ethernet Patch Cable, 10 Pack, Black (IMBA-CAT5-01BK-10PK):
GeauxRobot Raspberry Pi 3 Model B 4-layer Dog Bone Stack Clear Case Box Enclosure also for Pi 2B B+ A+ B A
GeauxRobot Raspberry Pi 3 Model B 4-layer Dog Bone Stack Clear Case Box Enclosure also for Pi 2B B+ A+ B A:
OdiySurveil(TM) 6Pcs Aluminum Chips VGA RAM Cooling Cooler Heatsink for IC MOSFET SCR,DIY for Raspberry Pi
OdiySurveil(TM) 6Pcs Aluminum Chips VGA RAM Cooling Cooler Heatsink for IC MOSFET SCR,DIY for Raspberry Pi:
100 Pcs M2.5 x 10mm + 6mm PC Board Hexagonal Hex Threaded Spacer
100 Pcs M2.5 x 10mm + 6mm PC Board Hexagonal Hex Threaded Spacer:
Anker [4-Pack] PowerLine Micro USB (1ft) - Charging Cable for Samsung, Nexus, LG, Android Smartphones and More (Black)
Anker [4-Pack] PowerLine Micro USB (1ft) - Charging Cable for Samsung, Nexus, LG, Android Smartphones and More (Black):
AC Infinity MULTIFAN S5, Quiet Dual 80mm USB Fan for Receiver DVR Playstation Xbox Computer Cabinet Cooling
AC Infinity MULTIFAN S5, Quiet Dual 80mm USB Fan for Receiver DVR Playstation Xbox Computer Cabinet Cooling:
Sabrent 60 Watt (12 Amp) 10-Port Family-Sized Desktop USB Rapid Charger. Smart USB Charger with Auto Detect Technology
Sabrent 60 Watt (12 Amp) 10-Port Family-Sized Desktop USB Rapid Charger. Smart USB Charger with Auto Detect Technology:

As a Supercomputing cluster, we're likely to want to run these machines at full computation capacity. That means the CPU's will run hot, and will need cooling. That is the function of the heat sinks and fans. The heat sinks are easy to install - simply peel off the covering on the tape, and affix to the CPU. The heat sinks by themselves don't keep the CPU's cool enough, so USB-powered fans will move enough air over the Raspberry Pi's to keep them cool.

The stand-off screws are a simple way to attach Raspberry Pi's together. You simply thread the screws into holes on the boards, and screw them together. Other mounting systems have you attach each Raspberry Pi to a carrier board, then the carrier boards are screwed together with stand-off screws. This approach is simpler.

Powering the Pi's requires a USB power supply with enough capacity to run the whole system. Pay careful attention to the ratings to be sure the charger has enough capacity. To minimize voltage drop, the chosen USB cords are short, and the positive/negative leads in the cords are larger than normal to carry more current.

An eight-node Raspberry Pi cluster requires a 10-port USB charger. Eight ports are required for the Pi's, one port for the USB fans, and one port for the ethernet switch shown here.

The ethernet switch does not natively support being powered from USB. However its power requirement fits within the power capacity of a USB charging cord. To make it work requires a USB to Type M Adapter Cable, which is readily available.

The Raspberry Pi cluster can use the ethernet switch as a case. Simply disassemble the ethernet switch, drill some holes in the top cover to match holes on the bottom Raspberry Pi.

About the Author(s)

(davidherron.com) David Herron : David Herron is a writer and software engineer focusing on the wise use of technology. He is especially interested in clean energy technologies like solar power, wind power, and electric cars. David worked for nearly 30 years in Silicon Valley on software ranging from electronic mail systems, to video streaming, to the Java programming language, and has published several books on Node.js programming and electric vehicles.