I Just Dumped My Raspberry Pi Cluster! (A New Heart For My Smart Home, Part 4)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone today's video will be about how i changed my mind about my need for a raspberry pi cluster long story short i don't need one anymore why let me explain but first if you're new to the channel my name is laszlo merza and this channel is with home automation home networking and sometimes with related stuff like the average ranks and even a little bit of 3d printing anyway let's continue with today's video of all if you haven't followed my story with building a so-called heart for my smart home well it's been an interesting one so first i started with one big server a strong intel machine then i realized that it eats up a lot of power so i decided that i should go with raspberry pi or as well paisa because it was a couple of years ago and yeah a single raspberry pi couldn't run all the stuff i wanted so i had two then i had four then i had five and then i just realized that having those separate pies with separate power supplies and separate operating systems everything manually updated configured was just two to use so i played with the idea of creating a laser pack cluster that is actually much smaller and has a single power supply and stuff like that and it was all fine to be honest and i thought to myself how cool is that how nerdy is that look at all the blinking lights and stuff like that so i put it in a nice case then i added the controller i called which was a super low powered mini itx machine and the networked all together so ended up with a single network cable and the single power cord and it was all fine so what went wrong with this setup turns out clustering stuff is not easy and yeah the plot twist is i'm a back-end developer by trade and i specialize in cloud specializing networking stuff so i should have known this but doing something in the cloud writing applications that are running in the cloud running on clusters is pretty different from trying to clusterize software that was never meant to be running in cluster so for example let's take a look at home assistant everything is encapsulated it's a nice piece of software i love home assistant but have you ever played with the idea of running multiple instances where they just share data and do stuff in parallel like how would you organize mqtt how do you organize your automations not easy and now just imagine that you are trying to do this with different machines so multiple raspberry pi is running multiple instances of home assistant yeah so at some point i ended up with a semi-clusterized solution like having multiple instances of the mqtt broker running behind proxy or load balancer and i experimented a lot but eventually given up so i just decided that i will use the raspberry pi cluster as uh like a set of docker hosts where i can just use micro kubernetes or stuff like that or multiple instances of port inner agent to move to host everything in containers and move around when needed and eventually it turned into a never-ending game of resource optimization so whenever i tried out something new i realized that okay this raspberry pi is running low on resources so i will just replace some containers and move some others to another raspberry pi then uh eventually this just became a mess to be honest so i started to look around what should i do and then i realized something on the pc market amd and intel is doing this crazy race for releasing newer and newer processors and because of that at least where i live but i assume this happens everywhere people started to sell old cpus like crazy so sixth or seventh generation intel processors unlike going for dirt cheap and they try to sell it because they are afraid that they will miss out on the newer processors and now with the gpu prices sky high people try to compensate with processors and yeah here we go the market is flooded with second-hand cheap cpus and then i remembered that i used to have a skylake which had this super low power consumption in idle and to be honest when you are running home automation and when you are running a home lab and you are not working with it uh chances are your process source spends a lot of time in idle for the sake of comparison i created three different setups first one is a raspberry pi cluster based on four raspberry pi 4b models with uh four gigabyte ram each the second one is pretty much the compute module based version of this one so once again four raspberry pies with four gigs of ram this time with uh compute modules and the last one is a skylake 6700 based server that you can create from well second-hand parts so i compared the prices and yeah all prices are in usd and uh secondhand parts i just looked those up on ebay and for the raspberry pi parts i use the official reseller prices so as you can see at this point having server that is based on the second hand parts and based on the trusty old sixth generation intel processor and the matching motherboard is pretty much the cheapest solution especially if you live in the us but the compute module module-based solution well i couldn't really find a simple go to solution here so when i talk about motherboard in case of a compute module based cluster it is obviously a carrier board that enables you to install for raspberry pi compute modules right now there's no such uh board on the market that is popular that is that is uh tested that is let's say loved by the community or something like that so there's no there's nothing like a default go to solution here actually there are different uh prototypes and uh well take a look around and you will see okay back to our topic uh in case of the raspberry pi's obviously the additional cost is the networking because for optimal performance you really don't want to have all those modules running on wi-fi close to each other and instead you want to wire them together via ethernet in case of a compute module-based system you don't need that because the carrier board takes care of communication but with the normal raspberry pis you need an extra ethernet switch in case of a skylake of course you don't need one because you have a single board power supply is also an interesting topic it is the part that i trust the least when it comes to second hand so instead i calculated with brand new prices uh this is actually good because well you cannot really find uh for at least i couldn't find uh secondhand uh power supplies for raspberry pi's so i just used the reseller price of the official raspberry pi 4 power supply that comes with that usbc connector for the skylake server i used an average price of lower wettage fsp power supply fsp is my go to brand when it comes to power supplies i've been using their power supplies for i don't know a decade now and i never had problems okay before proceeding i must note something because i know that every time i say server there's someone out there who wants to crucify me because server means ecc ram and stuff like that but think about it we're talking about raspberry pi's and desktop grade hardware used as a home server so yeah we are obviously in hobbyist territory and not in a professional environment okay with that in mind let's continue with power usage and stuff like that if you watched my previous videos about using this raspberry pi cluster extended with the controller unit and whatnot as a heart of the smart home you might remember this so it pulled around 55 ish watts from the wall and uh this was under average load so it's not that low to be honest but mind you this included the ssd storage the case with the cooling fans and the network card that connected all the pies to the controller unit now in the same case with the same cooler and yeah same power supply the current hardware the skylake based server pulls around 28 watts so it's quite an improvement and finally it's time to talk about software so since obviously you cannot compare a set of raspberry pi's against a server based on a totally different architecture i would rather compare the two systems as a whole so in case of that cluster on the controller i've been running proxmox and it had a set of vms like having ipfire and having a vm called controller that was running the mqtt broker and other small food paint stuff basically docker containers now in the new system i basically did the same to be honest i just swapped the ssds so instead of reinventing the wheel here i just took the ssd from the original system put it into this new skylake based one and migrated all the stuff from the raspberry pi's the cluster and to the same machine and also added some extras but more on that later so now it has home assistant which was uh dedicated which had a dedicated raspberry pi it has pie hole some smaller items like tasma admin have been moved from the one of the raspberry pi's which acted as a docker host to the controller as well so this is what i had now on a single machine i also added a small media server and some zfs based storage so here we go and as you can see i'm only using a fragment of the cpu time so i have plenty of resources free here the most concerning part is the memory of each uh well as you can see like 80 plus uh utilized which is uh well i wouldn't call it catastrophic but not too good either uh i can optimize the resources here to be honest so i just started experimenting with linux containers or alex lxc containers for short first the media server was running as a separate vm then i just realized that it eats up too much resources and started to look around for alternatives and found out about galaxy containers think about these containers as a halfway between a vm and the docker container so it it it's beefier as a docker container because you can install an operating system on it and you can run package installations and and different processes and whatnot but it does not offer a full virtual hardware stack and whatnot as a true vm so actually those are like super lightweight vms and as you can see this is uh the media server i assigned two cpu cores from the total of eight to uh to this one and it's more than enough although i must note that right now this is uh idling during uh let's say hardware transcoding of an of full hd video it's like i saying 15 ish so it's not that bad and still doesn't utilize uh too much of the overall resources of the whole host so probably by optimizing uh stuff like converting the controller vm into an alexa control container and stuff like that i can probably work my way down under 10 gigs or even 2 8 gigs unfortunately home assistant has its predefined vm so i cannot really do much about that but anyway all in all this looks very good so based on this the question arises um what will i do with the raspberry pi uh cluster uh yeah i still have a lot of different uses for novels in my mind so probably future projects experiments and stuff like that raspberry pi's are still super useful so i'm not planning to sell them or throwing them away or something like that they just not the way that i want to run the center part of my smart home at least not in the foreseeable future but who knows it's always something new to learn so i'm not saying never again so yeah that's it it's time to close this video and let me do that with a question so what are you using to run home assistant or other self-hosted services i'm pretty curious about what other people use because what i've just described works pretty flawlessly for me and it's super convenient and yeah doesn't eat a lot of power so use the comment section and while you're at it if you're not subscribed to the channel yet please consider subscribing i do my best to upload a new video every week and yeah i hope to see you next time next week with another video bye
Info
Channel: The Tinker Dad
Views: 1,196
Rating: undefined out of 5
Keywords: smart home, home automation, smart home setup, smart home devices, smart home technology, home assistant, home assistant operating system, home assistant raspberry pi, proxmox, tasmoadmin, home assistant add ons, home assistant integrations, the tinker dad, thetinkerdad, tinker dad, tinkerdad, home assistant in proxmox, home assistant in vm, home server 2021, cheap home server, diy home server
Id: 6BUJ7gcCQZA
Channel Id: undefined
Length: 16min 8sec (968 seconds)
Published: Sat Dec 04 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.