Report this

What is the reason for this report?

High CPU and Memory Load on Ubuntu 12 and LAMP

Posted on January 26, 2015

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



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

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 checked, 3 of the most memory users are:

  1. apache2 (www-data) 10-20% Cpu Usage, 280-350 MB memory usage
  2. clamd (clamav) 0-10% cpu usage, 220-280 MB memory usage
  3. apache2 (admin) 0-15% cpu usage, 90-200 MB memory usage

is this normal? is there any way to improve this? please…

Finally this helped, none of other solution did any change (add swap, monitor for banned iP’s, upgrade droplet):

## Edit /etc/my.cnf, and add the following line under the [mysqld] heading.
[mysqld]
innodb_buffer_pool_size=64M
```

Then restart: `$  service mysql restart`

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.