Optimise memory usage for multiple WP and MySQL on single VPS
I've migrated all my Wordpress sites to docker-compose based configs, basically one site is one directory, totally separeted in it's docker container. My compose file is based on this project:
This starts one Apache + PHP + MySQL per wordpress site. It works well, however I'd like to optimise it for better memory usage. I'm running 5 very low traffic WP sites on a 2 GB VPS and it's using 1.9 GB memory + 4 GB swap on vm.swappiness = 10.
What would you recommend for php config / mysql config to optimise it? I know sharing the MySQL instance would be a good optimisation, but I don't want to give up on the separate directory / separate container if possible. It's just great that I can manage all the sites 100% independently from each other.