Many asked out of curiosity, while others seem to shudder at the very idea of a pie cluster, because obviously a cheap pc would perform better right before we go any further id say. Probably ninety percent of you watching shouldnt build a pie cluster, but some of you should why well. The first thing i have to clear up is what a pie cluster isnt some people think when you put together, two computers in a cluster lets say both of them. Having 4 cpu cores and 8 gigs of ram, you end up with the ability to use 8 cpu cores and 16 gigs of ram well thats, not really the case. You still have two separate four core cpus and two separately addressable. Eight gig portions of ram storage. Can sometimes be aggregated in a cluster to a degree, but even there you suffer a performance penalty and the complexity is much higher over just having one server with a lot more hard drives. So thats, not what a cluster is. Instead, a cluster is a group of similar computers or even in some cases, wildly different computers that can be coordinated through some sort of cluster management to perform certain tasks. The key here is that tasks must be split up to work on members of the cluster. Some software will work well in parallel, but theres other software like games that can only address one gpu and one cpu at a time throwing flight simulator at a giant cluster of computers, isnt going to make it run any faster software, like that, simply wont run on Any pi cluster, no matter how big.

Luckily there is a lot of software that does run well in smaller chunks in parallel, for example, right now in my little home cluster, which im still building out im running prometheus and grafana on this first raspberry pi and monitoring. My internet connection, indoor air quality and household power consumption. This pie is also running pie, hole for custom dns and to prevent ad tracking on my home network. This next pie is running docker and serving up the website pidramble.com and the one after that is managing backups. For my entire digital life backing up all my data off site on amazon glacier, i also have another set of pies that typically runs kubernetes, but im rebuilding that cluster right now, but theres tons of other software that runs great on pis, pretty much any application that Can be compiled for arm processors will run on the pi, and that includes most things. Youd run on servers these days thanks to apples adopting arm with the new m1 max and amazon, using graviton instances in their cloud im, considering hosting next cloud and bitwarden soon to help reduce my dependence on cloud services and for better password management. A lot of people run things like home assistant on pis and there are thousands of different pi based automation, solutions for home and industry, but before we get to specifically why some people build pi clusters lets first talk about clusters in general. Why would anyone want to build a cluster of any type of computer? I already mentioned that you dont just get to lump together all the resources.

A cluster with 10 amd cpus and 10 rtx 3080s cant magically play crysis at 8k at 500 fps. Well, there are actually a number of reasons, but the two im usually concerned with are uptime and scalability for software other than games. You can usually design it, so it scales up and down by splitting up tasks into one or more application instances take a web server. For instance, if you have one web server, you can scale it up until you cant fit more ram in the computer or a faster cpu. But if you can run multiple copies, you could have one ten or a hundred workers running that handle requests and each worker could take as much or as little resources as it needs. So you could in fact get the performance of 10 amd cpus split up across 10 computers, but in aggregate not everything scales that easily, but even so another common reason for clustering is uptime or reliability. Computers die. There are two types of people in the world: people who have had a computer die on them, and people who will have a computer die on them and not just complete failure. Computers sometimes do weird things like the disk. Access gets slow or it starts erroring out a couple times a day or the network goes from a gigabit to 100 megabits. For seemingly no reason, if you have just one computer youre, putting all your eggs in one basket in the clustering world, we call these servers.

Snowflakes theyre precious to you unique and irreplaceable. You might even name them, but the problem is all computers need to be replaced. Someday and life is a lot less stressful if you can lose 1, 2 or even 10 servers, while your applications still run happy as can be because youre running them on a cluster. Now i mentioned that im running one instance of each of these applications on this cluster right now, im planning on splitting up a few of them, though, and probably using kubernetes on the entire stack. So i can have even better redundancy but having multiple pies and having good backups and automation to manage them means when a micro, sd card fails or a pie blows up. I toss it out and can have a spare running in a few minutes. Okay, so those arent all the reasons for clustering, but two of the main reasons most people would consider a cluster over one computer, but that doesnt answer the question why someone would run raspberry pis in their cluster. A lot of people questioned whether a 64 core arm cluster built with raspberry pis, could compete with a single 64 core amd, cpu and well thats, not a simple question. First, i have to ask: what are you comparing if were talking about price? Are we talking about 64 core amd cpus that alone cost six thousand dollars, because thats certainly more expensive than buying 16 raspberry pis, with all the associated hardware for around 3 000? All in, if were talking about power, efficiency, thats even more tricky? Are we talking about idle power consumption assuming the worst case, with poe plus power to each pi? 16 pies would total about 100 watts of power consumption all in according to serve the homes testing.

The amd epic 7742 uses a minimum of 120 watts and thats. Just the cpu, if youre talking about something like crypto mining, 3d, rendering or some other test thats going to try to use as much cpu and gpu power as possible, constantly thats an entirely different game. The pis performance per watt is okay, but its no match for a 64 core amd epic running full blast. Total energy consumption would be higher 400 plus watts compared to 200 watts for the entire pi cluster full tilt. But youll get a lot more work out of that epic chip on a per watt basis, meaning you could compute more things faster. But there are a lot of applications in the world that dont need full throttle, 24, 7 and for those applications. Unless you need frequent bursty performance, it could be more cost effective to run on lower power cpus like the ones in the pi, but a lot of people get hung up on performance, its not the be all and end all of computing, ive built at least five Versions of my pi cluster ive learned a lot. I learned about linux. Networking ive learned about power over ethernet ive learned about the physical layer of the network, ive learned how to compile software ive learned how to use ansible for bare metal configuration and network management. These are things that i may have learned to some degree from other activities or by building virtual machines on one bigger computer, but i wouldnt know them intimately and i wouldnt have had as much fun since building physical computers is so hands on.

So for many people, myself included, i do it mostly for the educational value. Even still some people say its more economical to build a cluster of old laptops or pcs. You may have laying around well, i dont have any laying around, and even if i did, unless you have pretty new pcs, the performance per watt from a pi 4 is actually pretty competitive with a 5 to 10 year old pc and they take up a lot. Less space and besides the pies typically run silent or nearly so, and dont act like a space heater all day, like a pile of older intel laptops but theres one other class of users. That might surprise you enterprise. Some people need arm servers to integrate into their continuous integration, ci or testing system, so they can build and test software on arm processors and its a lot cheaper to do it on a pi than on a mac mini or an expensive ampere computer. If you dont need the raw performance, and some enterprises need an on premise, arm cluster to run things like they would on aws graviton or to test things out for industrial automation where there are tons of pis and other arm processors in use. Finally, some companies integrate pis into larger clusters as small low power arm nodes to run software, that doesnt need bleeding edge performance or needs to be isolated from other servers. Another sentiment, i see a lot is that its too bad, the pi doesnt have ecc ram.

Well be ready to be shocked because the pi technically does have ecc ram check the product brief. The micron lp ddr4 ram, the pi uses technically has on die ecc. Now, when people say ecc, they mean a lot of different things and id say: half the people who complain about a lack of it. Couldnt, explain specifically how it would help their application run better, but it is good in a server setting for a lot of different types of software and the pi has it or does it well, not in the sense that expensive high end servers do the on die. Ecc can prevent memory access errors in the ram itself, but it doesnt seem to be integrated with a pi system on a chip. So the error correction is minimal compared to what youd get if you spent tons of money on a beefy server with ecc integrated through the whole system, so anyways. Those are my thoughts on what you could do with a cluster of raspberry pis. What are some other things youve seen people do with them and have you built your own cluster of computers before raspberry pi or anything else? Id love to see your examples in the comments until next time, im jeff gerling. Before we go any further, i should say blah blah blah thats, definitely something i should say, throwing fights, fight, fight, simulator. Some software will work well in pearl when you talk about fun and youre, not having fun thats, just insane hands on or by building virtual machines.

https://www.youtube.com/watch?v=8zXG4ySy1m8