manoj1986
By:
manoj1986

100% CPU usage - Magento website - Demo server - 1 GB/1 CPU plan

May 4, 2017 774 views
Apache MySQL Ubuntu

Hi,

We have demo server set-up couple of months ago. Recently we upgraded to DO updated Graphs. We see that CPU usage is 90-100%! As this is demo, we do not expected any users!!!

After getting advise from DO, we upgraded to Apache2-Prefork and PHP-FPM. I confirmed through command prompt and phpinfo() that both are successfully done. I also installed HTOP. Please see below snapshot of HTOP:

https://ibb.co/bQWB6Q

Waiting for expert opinion and insight.

2 Answers

Dear @manoj1986
Maybe I'm not that expert what you're looking for ...but I got help a year ago by #DigitalOcean user on same issue.
I had asked a question here, "sudo apt-get update" command is not working" and someone said me, that's because of you over MySQL uses.

You may study that. Maybe it can be helpful to you.

@manoj1986

The vast majority of your CPU is being utilized, according to htop, by the PHP-FPM process being ran as the www-data user. MySQL comes in as a close second with around 20% usage.

There could be a number of reasons why, though one that I am most familiar with is simply due to the fact that Magento is a relatively heavy script and it's doing quite a bit when someone visits, even if it is a demo.

Like most servers, even demo servers need to be tweaked and tuned to get the expected level of performance desired. In some cases, this can be done by adjusting configuration, in others, you may simply need more resources.

1GB of RAM is a good starting point, and it's normally what I recommend for smaller WordPress sites. Something as large as Magento would ideally benefit more from 2 CPU's and 2GB of RAM -- again, even if it is a demo.

Have another answer? Share your knowledge.