Question

High CPU and LOAD

Posted November 6, 2021 88 views
NginxPHPUbuntu 20.04

Hi,

The last 3 days the CPU and the Load has been at maximum constantly on my Droplet. I dont know what the problem is. I have googled some and I have tested some things.

Here is a link of Droplet Graphs, free -m on the Droplet and of the top -c stats of the droplet.

If someone can help me understand what si going on it will help alot in starting figuring out what is happening on the Droplet.

Best regards.

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.

×
Submit an Answer
2 answers

Hello,

As far as I can see the majority of the CPU usage is due to MySQL. What I could suggest is to follow the steps from this answer here on how to tweak MySQL for better performance and reliability:

https://www.digitalocean.com/community/questions/how-to-tweak-mysql-mariadb-configuration-for-increased-performance-and-stability

Also, PHP-FPM is the second service that is consuming quite a bit of resources. For this, I could suggest installing a caching module like PHP OPcache:

https://devdojo.com/bobbyiliev/how-to-speed-up-your-laravel-application-with-php-opcache

Also enabling a CDN for your website and installing a caching plugin could also reduce the overall load on the server.

If none of those methods help, I could suggest adding a little bit more hardware power so that you could have some extra buffer.

Let me know how it goes.
Regards,
Bobby

I also have the same problems in the last 24hrs - server has been fine for months and regularly in the last day it slows down and MySQL bombs and cannot connect - let me know how you get on with your droplet I guess we have similar issues