I was looking to make a Raspberry Pi 3 cluster just for the fun of it and for learning a bit about how clusters work. From my research I have seen that the cluster concept follows 1 machine which is the master machine, and other worker machines. The master machine interacts with the outside world and distributes the work to the other machines, essentially increasing processing power and speed of use.

From what I have so far seen though, many of the Raspi3 Clusters I have seen are not true clusters in that they do not communicate through hardware, and all require internet connection to communicate and distribute (despite being connected through cat 6 cables and a network switch).

Is there a way to have an offline cluster like this and have only the master node connected to the internet? What would the benefits be and would this sort of machine be able to handle larger programs such as simulations, mining or even games which require a large degree of processing power? Would this also in theory speed up the unit as a whole?

If anyone has any links or info that may help it would be greatly appreciated. As stated before the main reason I wish to undertake this is simply for fun and that I think it would be a cool hardware project to work on, but if I'm gonna do the job I wanna do it properly and ensure the software is set up correctly to be a true cluster. Many thanks.

  • Cripps
  • Ethernet is the best option to pass data between the nodes in my opinion, but this does not mean that this has to be an internet connection. The master node could use wifi to connect to the internet and use wired Ethernet to communicate between nodes. – Chad G Apr 5 '18 at 20:22
  • The only 'Benefit' of a pi cluster is educational or research. Programs have to written to work on a cluster so it will not just work on any program you have. But it is a great way to learn and develop these programs. Many large companies will use a pi cluster to develop code so it is not tying up time on their larger 'real' clusters. There is too many limiting factors and bottlenecks in data flow of the pi to make it really a good option. – Chad G Apr 5 '18 at 20:25

You certainly don't need any connection at all to the internet for a cluster to work and I haven't seen any that require an internet connection. It's also possible (easy even) to have only one PI with access to the internet. One of the PIs could use wifi to connect to the internet and the ethernet port can be connected to the other PIs via a switch.

You're right about a cluster having a master and a set of slaves but there are a few misconceptions about what a cluster can and can't do. For example it's misleading to say that a cluster of 100 PIs has 400 cores and 100GB of memory because those cores and that memory are not closely linked and cannot talk directly to each other - one PI processor (A) cannot access the memory of another PI (B) except to send a message out over the slow network stack and PI B then has to accept the message, decode it and respond in a similar way. There are still 100 processors each with their own private memory and each one still needs to run it's own operating system, although the code base for that can be shared over the network for ease of configuration.

A few quick notes might help with your understanding:

  • Each PI still needs it's own operating system, although the Raspberry PI 3 can boot from the network so the same code can be run on each PI (that means no need for 100 SD cards).
  • Each Pi still needs an IP address to communicate with the master node.
  • A DHCP server is needed to hand-out IP addresses to each PI (this can be on the master node).
  • The bottleneck is the slow network speed of 100mb/s (or 300mb/s if you use either a USB to ethernet adapter or the new Raspberry PI 3 B+).

For a cluster to be useful you need to have a task that lends itself to parallel computing, ie. can be easily split down into small independent chunks. One common example is compilation and anyone with a couple of Raspberry PIs with Raspbian installed on them can benefit from this by installing and configuring the 'distcc' package. Distcc speeds up compilation by sending out files to be compiled to the different slaves. For example, compiling the kernel on a Raspberry PI takes a few hours using 1 PI but a small cluster can compile the kernel in minutes. I know little about simulations and mining but I think they would benefit from a cluster but gaming probably not.

If you still have to buy a number of Raspberry PIs then I highly recommend you get the latest model - the PI 3 B+ as it has a faster network connection and can boot from the network. However they don't all need to be the same model although the really early models are so much slower that they would add little benefit to the cluster.

Interesting links:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.