Thank you for sharing your settings @michacassola
I don’t think there’s any performance to be gained by using a separated container for the DB.
As I see it, the main benefit is that you can control and tune the resources given to the DB and the APP separately. You can also define LXD profiles that you can then apply to containers, could make assigning proper values for DB and APP simpler, by including different datasets directly on the profile, hence the extra complexity of managing 2 containers would be compensated by simpler setup. Also, you probably do not need to backup your APP containers as much as your DB containers?
Back to MySQL, it requires (can benefit from) having 2 different recordsizes, theory says 16K for InnoDB files and 128K for the log, the APP containers could use 128K too?
—> Is there a better size than 128K for an Apache+FPM/PHP server?
—> Ideal recordsize for memcached or redis?
Then, because I will have to transfer snapshots to a remote backup server, I could be using a 1K recordsize dataset, for the entire backup server…
Hence, my new worry is, data/file transfers between different recordsizes. I am uncertain about how transferring a file from a 16K dataset to a 1M dataset will behave (or the other way around).
The only “information” I have about this is anecdotal from a post I found; it said that the performance improves noticeably when you properly adjust the recordsize for the workload, but then moving files from different datasets with different recordsize drastically increases CPU load and is also noticeably slower, especially from 16K to 1M and vice-versa.
Since I don’t know what “noticeably” or “drastically” exactly mean, and because this person was comparing desktop speeds on BSD and not server loads on Ubuntu, I don’t really know anything, but it was enough to make me further investigate (and worry about it).
Backup server is a 4x6G Raidz2 located in the same datacenter but different availability zone.
This is the one I am considering setting a unique recordsize=1M for the entire pool.
—> Since the data will be transferred over a network, do I even need to care about performance on the backup server’s pool? I will never need a speed greater than 1Gb/sec, as this is the max speed of the NIC)?
—> Since disk/fs performance (transfer speed) on the backup server is not a critical priority… Should I just optimize for “lower possible load on the origin” and hence use the same dataset sizes used on the parent containers that will be backed up? This way I would reduce any possible friction and possibly reduce (or not increment) the load on the live servers when backing up the containers by moving snapshots of said containers to the backup server?
—> Am I obsessing about something measurable in milliseconds or even nanoseconds that will have no impact or hardly any noticeable impact on my modest setup?
That looks very nice!
Inspired me to start working on a set of bash scripts to manage backups (for starters).
For now I have just a few scripts that I needed badly, but I will try to write some code every week.
I was thinking on using Python to wrap it all and present it either as a web UI or as an API, got plans for something of the sort?