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

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

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

FYI, a short spike in CPU usage while Virtualmin is performing some operation isn't unusual.

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?

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.

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

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.

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

1 root      20   0  120680   6692   4000 S  0.0  0.3   0:21.28 systemd

2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd

3 root      20   0       0      0      0 S  0.0  0.0   0:02.42 ksoftirqd/0

5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H

7 root      20   0       0      0      0 S  0.0  0.0   0:05.73 rcu_sched

8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh

9 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0

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

1 root      20   0  120680   6692   4000 S  0.0  0.3   0:21.90 systemd

2 root      20   0       0      0      0 S  0.0  0.0   0:00.00 kthreadd

3 root      20   0       0      0      0 S  0.0  0.0   0:02.48 ksoftirqd/0

5 root       0 -20       0      0      0 S  0.0  0.0   0:00.00 kworker/0:0H

7 root      20   0       0      0      0 S  0.0  0.0   0:05.85 rcu_sched

8 root      20   0       0      0      0 S  0.0  0.0   0:00.00 rcu_bh

9 root      rt   0       0      0      0 S  0.0  0.0   0:00.00 migration/0

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

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!

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

Thanks a lot, that will help. Enjoy the day off tomorrow!

I use Linode as well, it seems longview is a better tool to tell cpu usage instead using virtualmin dashboard.

Oh thanks, I will look at that and compare both. Just started with Linode so didn't know that feature was for that purpose.