Is there a recommended way to configure a mariadb container on LXD, in order to avoid disk i/o bottlenecks? What do you do?
I have a host with a mariadb zfs container which runs various mariadb databases that other containers are using (web applications). I have two disks with mirrored zpool configuration. Lately, the load on the host goes sky high (~ 30 or more) with high wait times. iostats shows 100% disk utilization and iotop shows mysqld is responsible. I read about tuning mariadb on ZFS, and I already setup these mariadb configuration parameters:
These seem to help, but I occasionally still get 100% disk usage and high uptime load times.
I also read that it’s best to use separate zfs datasets for the Innodb table data, with recordsize=16K and for the Innodb log files, with recordsize=128K. How would I set these record sizes with LXD? Is it worth it to attach and configure two additional zfs devices to the container (for data and logfiles) with these recordsizes? Could I just set recordsize=16K for the whole container?
Should I move the mariadb container to an ext4 filesystem (with dir LXD storage)? If I did that, I would lose snapshots.