Closed hyperknot closed 4 years ago
This project spins up 3 containers: wordpress (with php inside), phpmyadmin (with another php inside) and mysql. This is very inefficient memory use for a server to do each of these 3 for each blog. You should run only 1 mysql instance which you can do natively and don't need it to be in docker. Then, in this instance, you can setup different databases and users for each blog. PhpMyAdmin you don't need at all because you can do everything with mysql from the command line. You can then just run the wordpress container instead of this project which compose multiple containers.
For mysql memory usage it's a big topic and there are several sources to be found online. Just google for: how to minimize mysql memory usage OR how to reduce mysql memory usage.
The php memory usage is dynamic, you can only improve it by upgrading to newer PHP versions which have better memory efficiency or just by changing your php code. My installation has php 7.3.16 maybe php 7.4 or the upcomming php 8 are even more memory efficient.
You can also have a look at your server other processes to see which one are using memory.
If this answers your question you can close this issue.
I was more looking into a mysql config for 5.6, which is endorsed by some mysql developer, but this might not be the best repository to get it.
Thanks for this wonderful project, everything works great out of the box! My question is if anyone has figured out how to configure mysql to use minimal memory, as well as if there is anything which can be configured on the Wordpress side.
I'm running multiple low traffic blogs on a single VPS, thus it would be nice to figure out how to make this work without a large swap file.