How to trace the cause of CPU Spikes?

Posted February 28, 2015 21.6k views

I have everyday a CPU spike of 10 minutes at a random moment.
It goes up to 100%

Image picture:

Any idea’s how to trace the cause of this?

Is this normal?

ubuntu 14.04 32 bit
running services:
mailserver (postfix, smtp, imap, pop3)
a few wordpress websites

  • I happened to face similar issue once and when I traced, I found one of my wordpress plug in, backup was the reason.. Actually the backup location (Google Drive) was full and plug in was trying to compress and upload in such every 10/15 mins interval..

  • I’ve been having the same issue. I thought it was WP Super Cache since it’s the only plugin that performs a scheduled operation to dump cache at midnight. Whenever an editor updates a post, I have it set NOT to delete the cache to see if there is a pattern. Otherwise, I get these 50% – 100% CPU spikes seldom and randomly, but enough that it cripples the server when it happens.

    If it happens during the day, the only way to remedy this without pissing off the client as much is by restarting the server. It’s very inconvenient. There is no pattern, no odd errors or operations in the slow log.

    BTW, I use serverpilot to manage my database and WP install, but they just tell me to check the logs.

  • I could really use a “how to” document on this. I’m seeing occasional spikes of CPU usage and I would like to know what is causing them.

  • And here is another one:

    But it would be great to have one optimized for a Serverpilot/DigitalOcean/Wordpress system…

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
1 answer

The post linked to at: is “Not found” but I notified the site owners who responded with “Thanks for pointing that out. We’ll get it back up asap.”