What DB is it? What are you storing in it?should i move the DB to the pi 3 or pi 4? logic tells me that i should run DB in pi4 and webserver in pi3, but maybe there is another view.Start by moving your database server to a machine/pi where the only thing running there other than the OS is the DB server if you have not done so yet.the only trick i didn't use was storing the DB in ram and on the USB flash drive, The images where stored in a ramdisk, the website was very much constrained by disk, i have 300 symetric mbit, and the website still took 4 seconds to load, and speed insight and all those fancy tools from google and cloudflare pointed to that, i want to expand the website to include a fully fledge gallery, so it made sense to me to share the load across the 2 pi i have, my main pc as cluster master and maybe a pi5 that i have liying arround, if i can get it to be cool,
Running your Db server in ram makes no sense since all DB engines cache data in ram to begin with. Once data is looked up in disk the first time the DBMS keeps is there until it has no more RAM available to cache additional things and at that point it will discard the least used bits of cache first to try and free up enough memory for what it now needs to read from disk.
Some DB engines work a little different (redis does not persist to disk by default) but they all work in the principle that the machines ram and CPU are dedicated to the DBMS and OS only.
Unless you do this type of change first, clustering is only going to make things worse since you're introducing more software into the system, which all of them will compete for limited resources you have.
You want less software running, not more. If you need more software, you also need more horsepower to compensate for the extra convexity you're adding to the system/nodes.
Without knowing, the pi 4 is a better choice.
How active is this system going to be? 2 or 3 people storing pics? Or is this going to get regular constant use?
Pis aren't exactly choice hardware to run theses sort of things in a serious scale.
Statistics: Posted by memjr — Sat Mar 09, 2024 11:23 pm