raym3d
Posts: 31
Joined: Mon Dec 02, 2019 8:36 pm

Raspberry pi 4 cluster

Tue Jan 14, 2020 5:52 pm

I am seeing that when you make a cluster of Raspberry (join several) the power is increased.

My question is:

1. Is this true? Can I have a powerful computer with 2 raspberry pi 4 attached?
2. Do you know any good method to join only 2 raspberry?
3. Internally, how does it work, how is it possible to join two different computers?

Greetings.

User avatar
davidcoton
Posts: 5359
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 5:58 pm

  1. No. You can cluster computers, but you need particular sorts of tasks that can be shared to be able to use the two together.
  2. You can network them. Minimally, just a cable between the two.
  3. See first answer. It doesn't work like you expect/want.
Location: 345th cell on the right of the 210th row of L2 cache

fruitoftheloom
Posts: 24093
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 6:17 pm

raym3d wrote:
Tue Jan 14, 2020 5:52 pm
I am seeing that when you make a cluster of Raspberry (join several) the power is increased.

My question is:

1. Is this true? Can I have a powerful computer with 2 raspberry pi 4 attached?
2. Do you know any good method to join only 2 raspberry?
3. Internally, how does it work, how is it possible to join two different computers?

Greetings.

Look at the PiDramble, it is likely the most relevant project regarding a Cluster:

https://www.pidramble.com/


Though it will not make an 8 core super computer like you expect, that is just a ludicrous notion.
Last edited by fruitoftheloom on Tue Jan 14, 2020 6:22 pm, edited 1 time in total.
Thinking outside the box is better than burying your head in the sand...

User avatar
B.Goode
Posts: 10583
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 6:22 pm

Have a look at the Raspberry Pi website and blog.

There are a series of related blog posts searchable with the tag octapi, such as this one: https://www.raspberrypi.org/blog/octapi/

That should lead you to a project/tutorial - https://projects.raspberrypi.org/en/pro ... -an-octapi

You don't have to build this with eight nodes...

Reading that, or trying it for yourself, will allow you to find the answers to your own questions.

Heater
Posts: 16587
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 7:05 pm

raym3d,
Internally, how does it work, how is it possible to join two different computers?
The same way we 'join' humans.

We are discrete, independently operating beings, but we communicate. By whatever means possible. Like this discussion we are having now.

So computers can be made to work together by exchanging messages over whatever media. Typically a regular TCP/IP network.

But, none of that get's you any increased performance unless you have software than can be divided up to run different parts of the problem on different computers, and communicate between each other.

In short, no. You cannot make a faster computer simply by bolting lesser computers together.
Memory in C++ is a leaky abstraction .

drgeoff
Posts: 11135
Joined: Wed Jan 25, 2012 6:39 pm

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 7:09 pm

@raym3d

If one woman can make one baby in 9 months how many women are needed to make one baby in one month?
Quis custodiet ipsos custodes?

Heater
Posts: 16587
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 7:37 pm

drgeoff,
If one woman can make one baby in 9 months how many women are needed to make one baby in one month?
Do what the computer architecture guys do.

Make a pipeline of 9 women. Then on, average, you get a new baby every month. Never mind the latency at start up.

Of course the 9 women might have something to say about this idea.
Memory in C++ is a leaky abstraction .

Daniel Gessel
Posts: 121
Joined: Sun Dec 03, 2017 1:47 am
Location: Boston area, MA, US
Contact: Website Twitter

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 7:58 pm

I was just thinking about using two Pies to do alternate frame rendering with an external dongle to merge the HDMI streams, like an old school crossfire system...

Heater
Posts: 16587
Joined: Tue Jul 17, 2012 3:02 pm

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 8:14 pm

Given the speed of HDMI signalling I'm very sure that idea is never going to work.
Memory in C++ is a leaky abstraction .

dustnbone
Posts: 357
Joined: Tue Nov 05, 2019 2:49 am

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 8:25 pm

Daniel Gessel wrote:
Tue Jan 14, 2020 7:58 pm
I was just thinking about using two Pies to do alternate frame rendering with an external dongle to merge the HDMI streams, like an old school crossfire system...
SLI/Crossfire depend on very fast interconnects between the GPUs and their respective memory, no such way to connect 2 Pis together exists.

Traditional clustering works at the application level, not at the hardware level. Pis are perfectly capable of this type of clustering, with software designed for this purpose. Running arbitrary software like that won't work, it needs to be specifically designed to "farm out" tasks to other computers in the cluster over the network, and combine the results into a coherent output. It's not a peer to peer arrangement, but very much a client(s)/server one.

Daniel Gessel
Posts: 121
Joined: Sun Dec 03, 2017 1:47 am
Location: Boston area, MA, US
Contact: Website Twitter

Re: Raspberry pi 4 cluster

Tue Jan 14, 2020 8:33 pm

The dongles that used to ship with crossfire boards had an fpga in them that could merge two digital video signals in a few different ways: checkerboard, interlaced, and AFR. I don’t see why it wouldn’t work on the output of a pair of Pies, other than getting the two streams to sync (which might be the problem).

This has been replaced with successively faster interconnects (I believe today it’s called XGMA, but I don’t work on that part of the drivers).

But, yes, there was a time when crossfire just merged video streams...

wolf.z
Posts: 135
Joined: Thu Dec 24, 2015 8:34 pm

Re: Raspberry pi 4 cluster

Wed Jan 15, 2020 7:12 am

raym3d wrote:
Tue Jan 14, 2020 5:52 pm
...
My question is:
...
2. Do you know any good method to join only 2 raspberry?
...
From a minimalist's point of view, I like the idea of networking via USB. Since I had no application to run for, I can't report on what preformance you might expect, but you may spare the ethernet hub when networking just 2 Raspberrys together....
https://github.com/alexellis/docker-arm ... ter/OTG.md

User avatar
davidcoton
Posts: 5359
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Raspberry pi 4 cluster

Wed Jan 15, 2020 10:14 am

wolf.z wrote:
Wed Jan 15, 2020 7:12 am
raym3d wrote:
Tue Jan 14, 2020 5:52 pm
...
My question is:
...
2. Do you know any good method to join only 2 raspberry?
...
From a minimalist's point of view, I like the idea of networking via USB. Since I had no application to run for, I can't report on what preformance you might expect, but you may spare the ethernet hub when networking just 2 Raspberrys together....
https://github.com/alexellis/docker-arm ... ter/OTG.md
Certainly USB networking is potentially faster than Ethernet, as long as you use USB3 on the Pi4B. However, you need some hardware in between to allow to USB hosts to talk to each other (AFAIK).

Using an Ethernet cable for two Pis needs just that -- one cable. You have to give both of them static IPs (yuck), or set one as an AP (not trivial, but doable).
Location: 345th cell on the right of the 210th row of L2 cache

wolf.z
Posts: 135
Joined: Thu Dec 24, 2015 8:34 pm

Re: Raspberry pi 4 cluster

Wed Jan 15, 2020 10:29 am

davidcoton wrote:
Wed Jan 15, 2020 10:14 am
...
Certainly USB networking is potentially faster than Ethernet, as long as you use USB3 on the Pi4B. However, you need some hardware in between to allow to USB hosts to talk to each other (AFAIK).

Using an Ethernet cable for two Pis needs just that -- one cable. You have to give both of them static IPs (yuck), or set one as an AP (not trivial, but doable).
Well, it's quite the same with USB networking. No, you won't need a Hub since the OTG trick does the job with one Raspberry and up to 4 USB (networking) ports acting as a USB Master and all other Pis as USB Slaves. The up to 4 port thus slaves thing makes the difference.

User avatar
davidcoton
Posts: 5359
Joined: Mon Sep 01, 2014 2:37 pm
Location: Cambridge, UK
Contact: Website

Re: Raspberry pi 4 cluster

Wed Jan 15, 2020 10:57 am

wolf.z wrote:
Wed Jan 15, 2020 10:29 am
davidcoton wrote:
Wed Jan 15, 2020 10:14 am
...
Certainly USB networking is potentially faster than Ethernet, as long as you use USB3 on the Pi4B. However, you need some hardware in between to allow to USB hosts to talk to each other (AFAIK).

Using an Ethernet cable for two Pis needs just that -- one cable. You have to give both of them static IPs (yuck), or set one as an AP (not trivial, but doable).
Well, it's quite the same with USB networking. No, you won't need a Hub since the OTG trick does the job with one Raspberry and up to 4 USB (networking) ports acting as a USB Master and all other Pis as USB Slaves. The up to 4 port thus slaves thing makes the difference.
Except the Slave port is USB2, and so much slower than Ethernet at 1Gbs. And uses the USB-C connector, so alternative power arrangements are required.
Location: 345th cell on the right of the 210th row of L2 cache

Return to “General discussion”