Question
High CPU and Memory Load on Ubuntu 12 and LAMP
I have a droplet of 1 cpu 1 gb ram running ubuntu 12 (32 bit) and LAMP
And somehow i feel that the website is running so slow (wordpress with only 1 user and very few data because i’m still developing)
so i put Monit and it says:
Status Load CPU Memory Swap
Resource limit matched [0.19] [0.41] [0.22] 11.3%us, 1.3%sy, 0.0%wa 85.7% [879476 kB]
so put some 1Gb swap
and the cpu went as much as 98%
so i ran top and i see apache2 is using most of the memories
Any solution
I tried so many solution like limiting cpu etc but didn’t work
i’m a noob in linux and vps…so please be kind
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×
So i disabled autoindex and made this kind of miodification
StartServers 3
MinSpareServers 3
MaxSpareServers 5
MaxClients 30
MaxRequestsPerChild 0
it was lowered down to around 50-60%, so i hope it won’t climb back, because as for now i barely have contents and user....
Any specific suggestion to optimize my case?
thank you
Now the cpu is 100% and the memory is 80%...........
I had similar situation where the load spiked drastically this morning. But have no definitive solution to help you other than maybe you could create an additional droplet and connect it to your main via a private network IP address and have it run some of the processes for your internet facing droplet.
I personally use Ubuntu 14.04 LTS (LTS = Long Term Support) Ubuntu 12 is nearing its “end of life” cycle. Check out https://help.ubuntu.com and https://help.ubuntu.com/community/CommunityHelpWiki loads of information and lots of tutorials. Another great site to help you with inspiration is https://www.howtoforge.com it’s got lots of tutorials on building specific types of servers for Ubuntu and other OSes.