Submitted by Ksho on Fri, 12/23/2016 - 15:43
Hi New person here.
I have my server set up - but one thing I don't understand is I get a CPU spike near 100% when I make a change. For example, I created a virtual server, and it caused the CPU to spike to 93% or so. Same with other processes.
The server is new so I don't think it would be hacked or anything, hec there's nothing on it and it's not active.
Any ideas on this?
Thanks
Status:
Active
Comments
Submitted by andreychek on Fri, 12/23/2016 - 16:16 Comment #1
Howdy -- is this a VPS, or a dedicated server? If it's a VPS, what kind of VPS is it?
About long does the CPU spike last for?
And what is the output of these two commands now (when there isn't a spike):
uptime
free -m
Submitted by Ksho on Fri, 12/23/2016 - 16:33 Comment #2
Hi It's with Linode, a VPS
Here is the first one: 17:30:07 up 6:59, 1 user, load average: 0.07, 0.06, 0.06
Heres is the second? :~# free -m total used free shared buff/cache available Mem: 1997 247 510 19 1239 1671 Swap: 255 0 255
I would say 5 minutes - 10 minutes at times.
Thanks
Submitted by JamieCameron on Fri, 12/23/2016 - 16:41 Comment #3
FYI, a short spike in CPU usage while Virtualmin is performing some operation isn't unusual.
Submitted by andreychek on Fri, 12/23/2016 - 18:16 Comment #4
It's normal for it to spike during the process, though after a few minutes it should go back to normal.
Here's what we could try --
Next time you're preparing to create a Virtual Server, first run this command before creating it:
top -b -n 1|head -30
Then, create the Virtual Server, wait 2 minutes after it completes, and then run the same command again.
Could you share the output of both commands with us?
Submitted by Ksho on Fri, 12/23/2016 - 18:55 Comment #5
Thanks both for the information. I will do that when I get a sub domain set up.
Yeah it is more of a short spike - it's just I look at the CPU graph and it was right up there. Good to know it can be expected. I'll also time the spike as best I can and report it.
Thanks again.
Submitted by Ksho on Fri, 12/23/2016 - 21:44 Comment #6
Spike time: about 5 min 10 seconds. Spike to 100%
I installed roundcube, the ran a re-check configuration and simply switched back between the Webmin Tab and Virtual Min tab.
That's with no users on and hardly anything installed.
Does this seem reasonable?
Thanks
Submitted by andreychek on Fri, 12/23/2016 - 23:15 Comment #7
It's a little longer than I'd have expected.
However, that may simply be due to which Linode you're on... your particular Linode may have a high amount of disk IO in use by the other users on it, which can cause that.
I'd be curious what the results showed if you tried the steps in Comment #4 above.
Submitted by Ksho on Sat, 12/24/2016 - 10:10 Comment #8
Hi Here are the details: (Note, the server CPU level went up only to 41% this time - timed exactly 2 minutes after creating the virtual server). It was 100% last time. Could it be because the virtual server was the same name as my FQDN? It was named the same. This virtual server was not named the same.
Here are the details: Before top - 10:54:53 up 1 day, 24 min, 1 user, load average: 0.00, 0.02, 0.00
Tasks: 156 total, 1 running, 155 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.8 us, 0.5 sy, 0.0 ni, 97.6 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 2045224 total, 438624 free, 302120 used, 1304480 buff/cache
KiB Swap: 262140 total, 261720 free, 420 used. 1627528 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 lru-add-dra+
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
13 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
296 root 20 0 0 0 0 S 0.0 0.0 0:00.00 oom_reaper
297 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback
299 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kcompactd0
300 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 crypto
301 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
302 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
304 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
418 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ata_sff
432 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 md
527 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 rpciod
529 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xprtiod
675 root 20 0 0 0 0 S 0.0 0.0 0:00.23 kswapd0
After top - 10:59:17 up 1 day, 28 min, 1 user, load average: 0.70, 0.27, 0.09
Tasks: 154 total, 1 running, 153 sleeping, 0 stopped, 0 zombie
%Cpu(s): 1.9 us, 0.5 sy, 0.0 ni, 97.6 id, 0.1 wa, 0.0 hi, 0.0 si, 0.0 st
KiB Mem : 2045224 total, 428696 free, 306152 used, 1310376 buff/cache
KiB Swap: 262140 total, 261720 free, 420 used. 1623980 avail Mem
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
10 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 lru-add-dra+
11 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
12 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
13 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 netns
296 root 20 0 0 0 0 S 0.0 0.0 0:00.00 oom_reaper
297 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 writeback
299 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kcompactd0
300 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 crypto
301 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kintegrityd
302 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 bioset
304 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 kblockd
418 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 ata_sff
432 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 md
527 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 rpciod
529 root 0 -20 0 0 0 S 0.0 0.0 0:00.00 xprtiod
675 root 20 0 0 0 0 S 0.0 0.0 0:00.23 kswapd0
Thanks
Submitted by andreychek on Sat, 12/24/2016 - 11:08 Comment #9
Okay, looking at the "top" numbers -- the resource usage you're seeing really isn't very high, "0.70" is pretty normal.
So I'd say all that looks good!
Submitted by Ksho on Sat, 12/24/2016 - 12:51 Comment #10
Sounds good. May I ask through, if the server CPU indicator is at 100% does that mean it's at 1.0? If it goes to 70%, does that mean .7? If so I guess it didn't register. Thanks
Submitted by andreychek on Sat, 12/24/2016 - 13:15 Comment #11
That's correct. A load of 1.00 really isn't that bad though. There's more details on load average here:
http://www.howtogeek.com/194642/understanding-the-load-average-on-linux-...
Submitted by Ksho on Sat, 12/24/2016 - 15:34 Comment #12
Thanks a lot, that will help. Enjoy the day off tomorrow!
Submitted by info@orderlastm... on Mon, 12/26/2016 - 00:24 Comment #13
I use Linode as well, it seems longview is a better tool to tell cpu usage instead using virtualmin dashboard.
Submitted by Ksho on Mon, 12/26/2016 - 14:06 Comment #14
Oh thanks, I will look at that and compare both. Just started with Linode so didn't know that feature was for that purpose.