5

I have a VPS hosting a small web app (apache, php-fpm, mysql) that's mostly idle for now as the traffic is quite low.

Surprisingly, the load average is always >= 3.00:

# uptime
 02:20:00 up 69 days,  6:03,  1 user,  load average: 3,04, 3,04, 3,05

I've been seeing this for weeks, and ended up considering this 3.00 as my 0.00. The CPU usage is close to 0%, the server is as fast as I would expect, and there is no other sign of server load.

But still, this stirs my curiosity. What can cause this permanent load average?

top shows an idle server:

top - 02:25:56 up 69 days,  6:09,  1 user,  load average: 3,07, 3,07, 3,05
Tasks: 218 total,   1 running, 216 sleeping,   0 stopped,   1 zombie
%Cpu(s):  0,0 us,  0,3 sy,  0,0 ni, 99,7 id,  0,0 wa,  0,0 hi,  0,0 si,  0,0 st
KiB Mem :  3878668 total,   165660 free,  1187816 used,  2525192 buff/cache
KiB Swap:  4079612 total,  3810976 free,   268636 used.  2132052 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
 2200 root      20   0       0      0      0 S   0,3  0,0   0:00.02 kworker/0:0
26243 mysql     20   0 3297012 702988   7740 S   0,3 18,1 248:38.28 mysqld
    1 root      20   0  188692   3456   2076 S   0,0  0,1  12:30.25 systemd
    2 root      20   0       0      0      0 S   0,0  0,0   0:03.11 kthreadd
    3 root      20   0       0      0      0 S   0,0  0,0   1:31.56 ksoftirqd/0
    5 root       0 -20       0      0      0 S   0,0  0,0   0:00.00 kworker/0:+
    7 root      rt   0       0      0      0 S   0,0  0,0   0:01.09 migration/0
    8 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcu_bh
    9 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/0
   10 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/1
   11 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/2
   12 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/3
   13 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/4
   14 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/5
   15 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/6
   16 root      20   0       0      0      0 S   0,0  0,0   0:00.00 rcuob/7

I have read this question: CPU 100% idle but still showing load average but it didn't help.

Can this be a side effect of the server being virtualized?

Edit: iostat output:

# iostat -x 1 20
Linux 3.10.0-327.10.1.el7.x86_64 (centos02)     07/06/2016      _x86_64_        (2 CPU)

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           6,23    0,00    0,32    0,32    0,00   93,13

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,15    0,05    7,53     1,57    79,92    21,50     0,08   10,76   12,29   10,75   3,93   2,98
dm-0              0,00     0,00    0,00    0,04     0,01     0,14     8,01     0,03  842,38    6,66  908,04   0,35   0,00
dm-1              0,00     0,00    0,02    5,64     0,98    73,38    26,26     0,06   11,03   14,83   11,02   5,19   2,94
dm-2              0,00     0,00    0,03    0,09     0,57     6,39   112,18     0,05  370,36   10,75  482,51   4,09   0,05

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           3,03    0,00    1,52    0,00    0,00   95,45

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     1,00    0,00    9,00     0,00    64,00    14,22     0,05    5,33    0,00    5,33   5,11   4,60
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    8,00     0,00    64,00    16,00     0,05    6,12    0,00    6,12   5,75   4,60
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,50    0,00    0,50    1,01    0,00   97,99

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00   53,47     0,00   728,71    27,26     0,22    4,04    0,00    4,04   3,74  20,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00   39,60     0,00   728,71    36,80     0,22    5,45    0,00    5,45   5,05  20,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,51    0,00    0,00    0,00    0,00   99,49

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    6,00     0,00    16,00     5,33     0,03    4,17    0,00    4,17   4,17   2,50
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    4,00     0,00    16,00     8,00     0,03    6,25    0,00    6,25   6,25   2,50
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,50    0,00    0,00    0,00    0,00   99,50

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00   16,00     0,00   104,00    13,00     0,13    8,25    0,00    8,25   0,62   1,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00   15,00     0,00   104,00    13,87     0,13    8,80    0,00    8,80   0,67   1,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,00    0,00    0,00    0,00    0,00  100,00

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2,54    0,00    1,02    0,00    0,00   96,45

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00   29,00     0,00   736,00    50,76     0,28    9,69    0,00    9,69   2,28   6,60
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00   29,00     0,00   736,00    50,76     0,28    9,69    0,00    9,69   2,28   6,60
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,00    0,00    0,00    0,00    0,00  100,00

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           1,01    0,00    1,01    0,50    0,00   97,49

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    3,00     0,00    12,00     8,00     0,02    6,33    0,00    6,33   6,33   1,90
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    2,00     0,00    12,00    12,00     0,02    9,50    0,00    9,50   9,50   1,90
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,00    0,00    0,00    0,00    0,00  100,00

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,00    0,00    0,00    0,00    0,00  100,00

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,50    0,00    0,50    0,00    0,00   99,00

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    1,00     0,00     8,00    16,00     0,01    7,00    0,00    7,00   7,00   0,70
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    1,00     0,00     8,00    16,00     0,01    7,00    0,00    7,00   7,00   0,70
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,00    0,00    0,00    0,00    0,00  100,00

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2,51    0,00    1,51    0,00    0,00   95,98

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           2,02    0,00    0,00    0,00    0,00   97,98

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,00    0,00    0,00    0,00    0,00  100,00

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           1,01    0,00    0,00    0,00    0,00   98,99

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     1,00    0,00   19,00     0,00   588,00    61,89     0,07    3,58    0,00    3,58   1,74   3,30
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00   20,00     0,00   588,00    58,80     0,07    3,45    0,00    3,45   1,65   3,30
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,00    0,00    0,00    0,00    0,00  100,00

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,00    0,00    0,50    0,00    0,00   99,50

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

avg-cpu:  %user   %nice %system %iowait  %steal   %idle
           0,50    0,00    0,00    0,00    0,00   99,50

Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
sda               0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-0              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-1              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00
dm-2              0,00     0,00    0,00    0,00     0,00     0,00     0,00     0,00    0,00    0,00    0,00   0,00   0,00

Edit:

# ps -ALo stat,pid,comm | egrep '^(R|D)'

Dsl    857 prltoolsd
Dsl    857 prltoolsd
Dsl    857 prltoolsd
R+    2307 ps
BenMorel
  • 4,685

4 Answers4

7

From the output of ps -ALo stat,pid,comm | egrep '^(R|D)', it seems that you have three processes in uninterruptible sleep (D state). As Linux count processes in D state when calculating loadavg, maybe these three prltoolsd processes are the cause of the relatively high load average.

From a Google search, it seems that prltoolsd is part of the "Parallels Tools" suite, some sort of guest additions for the hosted image. As they are sleeping in kernel-level system calls (ie: uninterruptable sleep), maybe thery are listeing on a "fake" device to allow the host system to communicate with the guest system, hence the 3.0 load average value.

If you want to be really sure they are the cause of the problem, stop the prltoolsd processes and/or uninstall the tools. Anyway, I strongly suspect you can completely ignore them and the 3.0 load average...

shodanshok
  • 52,255
4

First of all, load average is a useless metric without context, particularly knowing how many CPU cores your server has. A load average of 3 on a single-core server (somewhat busy) is very different from the same load average on one with, say, 64 cores.

That said, mysqld is your top process, and it's multi-threaded, meaning the one process can actually be using multiple CPU cores at once. Run ps -efT | grep mysqld to see how many active threads it has. top will also show threads with the -H option. Even if mysql isn't actively getting queries, it does run some background tasks. You may want to check its logs to see what it's doing.

Karen B
  • 534
2

On Linux a process that got stuck in I/O would also be counted as placed into run-queue. This is a bug feature. You can check/show vmstat 1 2's output, to see if you have any blocked, for e. g..

poige
  • 9,730
  • 3
  • 28
  • 53
0

i would check connections to my server (/var/log/secure and /usr/local/apache/logs/access_log) a useful way to find out ip's that are making multiple connections to server

netstat -atun | awk '{print $5}' | cut -d: -f1 | sed -e '/^$/d' |sort | uniq -c | sort -n

Also, check if the node that's holding that vm isn't under high load or is having issues with disk(s).

RonanW.
  • 429