Supercomputing with Raspberry Pi | HackSpace 41
Although it’s a very flexible term, supercomputing generally refers to the idea of running multiple computers as one, dividing up the work between them so that they process in parallel.
In theory, every time you double the amount of processing power available, you half the time needed to complete your task. This concept of ‘clusters’ of computers has been implemented heavily in large data processing operations, including intensive graphics work such as Pixar’s famous ‘render farm’. Normally the domain of large organisations, supercomputing is now in the hands of the masses in the form of education projects and makes from the cluster-curious, but there have also been some impressive real-world applications. Here, we’ll look at some amazing projects and get you started on your own supercomputing adventure.

OctaPi
One of the first high-profile cluster projects surprisingly came from the boffins at GCHQ (Government Communications Headquarters) in the UK. Created as part of their educational outreach programme, the OctaPi used eight Raspberry Pi 3B computers to create a cluster. Kits were loaned out to schools with multiple coding projects to engage young minds. The first demonstrated how supercomputing could speed up difficult equations by calculating pi. A more advanced, and very appropriate, task showed how these eight machines could work together to crack a wartime Enigma code in a fraction of the time it would have taken Bletchley Park.

Turing Pi
As we’ve already said, most Raspberry Pi cluster projects are for education or fun, but there are those who take it seriously. The Raspberry Pi Compute Module form factor is perfect for building industrial-grade supercomputers, and that’s exactly what Turing Pi has done. Their custom Turing Pi 1 PCB can accept up to seven Raspberry Pi 3+ Compute Modules and takes care of networking, power, and USB connectivity. Although claiming a wide range of uses, it appears to have found a niche in the Kubernetes world, being a surprisingly powerful device for its price. Future plans have been announced for the Turing Pi 2, based on the more powerful Raspberry Pi 4.

Water-Cooled Cluster
Multiple machines are one thing, but there’s also the individual speed of those machines. The faster they go, the faster the cluster operates exponentially. Overclocking is common in supercomputing, and that means heat. This water-cooled cluster, which maker Michael Klements freely admits is one of those ‘just because’ undertakings, uses the kind of water cooling usually found on high-end gaming PCs and applies it to a Raspberry Pi cluster. This beautiful build, complete with laser-cut mounts and elegant wiring, has been extensively documented by Klements in his blog posts. We can’t wait to see what he does with it!

Oracle Supercomputer
So how far can we take this? Who has built the largest Raspberry Pi cluster? A strong contender seems to be Oracle, who showed off their efforts at Oracle OpenWorld in 2019. No fewer than 1060 Raspberry Pi 3B+ computers were used in its construction (that’s 4240 cores). Why 1060? That’s as much as they could physically fit in the frame! The creation has no particular purpose bar a demonstration of what is possible in a small space, cramming in several network switches, arrays of USB power supplies, and a NAS (network-attached storage) for boot images.

Make your own
We’re thinking you probably don’t fancy trying to beat Oracle’s record on your first attempt, and would like to start with something a bit simpler. Our sister magazine, The MagPi, has published a cluster project you can make at home with any number of Raspberry Pi devices (although just one might be a little pointless). In this case, four Raspberry Pi 4B computers were assigned the job of searching for prime numbers. Each is assigned a different starting number, and then each adds four before testing again. This is handled by an open-source cluster manager, MPI (Message Passing Interface). A solid introduction to what is possible.

Issue 41 of HackSpace magazine is on sale NOW!
Each month, HackSpace magazine brings you the best projects, tips, tricks and tutorials from the makersphere. You can get it from the Raspberry Pi Press online store or your local newsagents. As always, every issue is free to download from the HackSpace magazine website.

17 comments
Misel
and probably hundreds more on Kickstarter :D
Anders
I have three Pi4Bs with PoE hats hanging off a PoE switch for running a Kubernetes training space that is a bit more functional than MiniKube. I’ve been looking for a nice casing for them, but existing ones don’t seem to accommodate the PoE fan.
I will be very interested in the Turing Pi2 when it appears. I’m on their mailing list.
CooliPi
PoE enabled heatsink+case? What about…CooliPi?
The integrated small fan kicks in at about 46˚C, turning off some 4˚C lower – there’s a small hysteresis there. You can reach those temperatures with synthetic load and/or at high ambient temperature. You can remove the fan altogether.
Some tests by The MagPi magazine: https://magpi.raspberrypi.org/articles/group-test-best-raspberry-pi-4-thermal-cases-tested-and-ranked
Anders
Coolpi is cool but I’m looking for a stacked single case to hold all the Pis and possibly the switch too.
Cases
I am pretty happy with this one that will accommodate 8 SBC and a PoE switch.
I can confirm it fits the Pi 4 and with the official PoE hat.
https://www.amazon.com/gp/product/B0844YSJWB/
Zintoki
I tried to render same scene in Blender with pi4b@1.8ghz and intel N4100. N4100 have double the performance of Rpi. 1x zen2 core have performance as 6 N4100 cores, so normal desktop cpu like ryzen 3700x is equal to 24x Rpi4b.
Richard collins
Thanks for letting us know, we never knew that a desktop CPU would be faster than a low power mobile chip. Lucky you were about to point that out. I assume later you’ll be off to the hills to tell people no point going up as someone walked it the day before.
Note: We do it because we can.
Prometheo
Hi, I found this answer very interesting, because my requirement as novice, but creative user is raw power for rendering 4K video+ and 3D applications. If terragen 4 is rendering one frame of 8megapixel resolution in 2 hours 20 minutes on an intel core I9 9900K 8-core cpu, how much computing power would I need to render an animation (24 frames of 8MP resolution= 4K) of 10 seconds in one afternoon? That is the question more creative users struggle with…
Steve
“The faster they go, the faster the cluster operates exponentially.” Really? How does THAT work?
HPCguy
Has anyone ported McKernel to a Raspberri Pi cluster? Now you’re talking supercomputing!!!
Richard collins
As cool as the oracle cluster is (and I would love to see it in person some day) I worry about the e-waste. I have four RPi’s in a cluster on my desk. Come in very handy for automated tests and builds. As well as unit tests on my repos. Far more convenient that nagging the sys admin for time on the companies build server. :)
HPCguy
Has anybody ported the ARM-based supercomputing O/S, McKernel, to the Raspberry Pi? Now that would be *real* Supercomputing on this amazing low-cast architecture.
Fritz Reichmann
Another educational product for high performance computing based on RaspberryPi’s I found here: http://cluster.bitscope.com/
Yassine
Hi everybody, a good idea I’ve had in the last few years would be to use distributed computing to play on the difference in time zones to allow people with a single Raspberry Pi to actually have that power squared, when a person is using a PI computer they are actually using 1-3 other PI’s in the world that are connected to the distributed network but are on standby, 16gb of RAM if you’re talking about Raspberry Pi’s 4gb RAM is 1CPU && 3Vcpu
Paul
The blog shows what can be built , but a follow up blog on real world use of Raspberry Pi clusters outside the educational sector. I sure they must be benefits of using 1080 raspberry pi 3’s to run a supercomputer, but what are they ?
Eric Olson
My understanding is that the 1060-node Oracle cluster as well as the 750-node LANL cluster
https://www.top500.org/news/lanl-turns-to-raspberry-pi-for-supercomputing-solution/
were both designed to demonstrate and develop scheduling and fault tolerant algorithms for the execution of massively parallel programs without using too much electricity.
The goal is not to perform large science computations, but to serve as a test bed for the development of robust parallel processing techniques. New fault-tolerant techniques are needed for the coming exascale supercomputers which consist of so many nodes that (even with ECC memory and more) at least one is likely to fail during the run of any large parallel computation.
Another use for a Pi cluster is to run cloud-like micro services using a physical separation of hardware to avoid Spectre-like side channel information leaks. That’s not supercomputing, however, so never mind that.
Paul
Eric, That’s a great answer, I do think “execution of massively parallel programs without using too much electricity” will become ever more important as the world tries to head towards net zero GHG emissions. I doubt that governments and university science labs around the world even bother to contemplate the environmental impact of plugging their latest top 500 supercomputer as long as ‘someone’ pays the electricity bill.