How do I make sure "spikes" in CPU usage does not keep happening?

Hello,

Every so often, I see some "spikes" in CPU usage. I wanted to make sure I did not need extra space requirements.

For the most part, the CPU usage is okay.

I see these spikes when IPv6 usage is high and when Disk I/O is high.

This goes for inbound and outbound traffic.

Seth

P.S. Any pointers would be nice. So, if you have time, please let me know if you need any more info. and I will stay patient.

5 Replies

Hello Once More,

I looked through the older articles. I found this:

iostat 1 10

and…

top -bn 1 | head -15

I ran both commands. I found nothing in the commands b/c the "spike" was not during the running of those commands. There seems to be very specific times when "spikes" in CPU usage occur.

Seth

Hi Seth,

I'm happy to give you some pointers and guidance on this.

The two commands that you posted are great to use in cases like this. The iostat 1 10 command will help you check on overall system performance.

Another command that's good for monitoring purposes is vmstat. This will collect and report data about several things, including your Linode's processor resource ultilization in real time. We have a guide that goes over using vmstat here:

Use vmstat to Monitor System Performance

While the top command you posted is one I recommend as well, there are other iterations of the command that you may find useful. The link below will give you our guide on using top to its full potential:

Using top to Monitor Server Performance

As you've pointed out, however, these commands are the most useful when these spikes are happening. You really have to catch your server in the act of consuming a large amount of CPU in order to catch the process(es) that are causing the spikes.

I do recommend seeing if there are any cron jobs that you've set up that might coincide with the timing of these spikes.

Another step you can take is checking your server's log files to see if you can find clues as to what may have caused the spikes. We have another post on our Community Site which goes over the logs in detail, which I recommend taking a look at:

How Do I Check My Server's Log Files?

If you have specific output from any of the commands you've run, you can always open up a Support Ticket and we'll be happy to take a look with you to help you interpret it.

Hello Linode Staff,

Seth here. Yep. You are right. I would really have to catch it. I do not have any cron jobs running that I am aware of now.

At least, I did not set any up.

Seth

P.S. I will read over those articles and report back. Thank you for your service.

@silver2row I'm also seeing you tagged this post with 'apache2' — you might find this guide helpful in mitigating CPU-intensive workloads related to the service:

Tuning Your Apache Server

@bbigger,

Thank you. I will view that one in time, too.

Seth

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct