0

I have several websites that are running on Intel Xeon-Lynnfield 3470-Quadcore [2.93GHz].

With this dedicated server it seems that MySQL is still not optimized to run on the many visitators these websites are brigingin.

RAM is 16GB. But, still the WHM shows high load of CPU.

I'm posting below the results of top hitting 1 afterwards.

top - 10:07:48 up 15:17,  4 users,  load average: 9.04, 6.77, 8.38
Tasks: 308 total,   1 running, 306 sleeping,   0 stopped,   1 zombie
Cpu0  : 11.2%us,  1.7%sy,  0.0%ni, 86.8%id,  0.0%wa,  0.0%hi,  0.3%si,  0.0%st
Cpu1  :  4.3%us,  3.0%sy,  0.0%ni,  0.3%id, 85.4%wa,  0.0%hi,  7.0%si,  0.0%st
Cpu2  :  4.3%us,  0.7%sy,  0.0%ni, 94.0%id,  0.0%wa,  0.3%hi,  0.7%si,  0.0%st
Cpu3  :  6.3%us,  2.7%sy,  0.0%ni, 91.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu4  :  6.3%us,  0.7%sy,  0.0%ni, 93.0%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu5  : 10.9%us,  2.0%sy,  0.0%ni, 82.5%id,  4.6%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu6  :  0.7%us,  0.3%sy,  0.0%ni, 98.3%id,  0.7%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu7  :  8.6%us,  3.3%sy,  0.0%ni, 84.1%id,  1.0%wa,  0.3%hi,  2.7%si,  0.0%st
Mem:  16428144k total,  6560376k used,  9867768k free,   714452k buffers
Swap:  2096440k total,        0k used,  2096440k free,  3508028k cached

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
19574 songonly  17   0  165m  41m 7348 S  6.3  0.3   0:00.19 php
 2282 root      10  -5     0    0    0 D  4.0  0.0   9:55.06 kjournald
24262 mysql     15   0 1452m 782m 4180 S  1.7  4.9  41:50.00 mysqld
 5196 root      21   0 4371m 123m 9352 S  1.0  0.8   9:24.01 java
19160 root      15   0 12876 1268  812 R  0.7  0.0   0:00.21 top
 1381 root      15   0 94248 3440 2672 S  0.3  0.0   0:00.76 sshd
 5000 named     25   0  286m 6692 1980 S  0.3  0.0   1:44.91 named
10585 nobody    15   0 74404 3744 1544 S  0.3  0.0   0:00.45 httpd
15638 nobody    15   0 74404 3716 1532 S  0.3  0.0   0:00.20 httpd
16790 nobody    15   0 74404 3688 1532 S  0.3  0.0   0:00.12 httpd
17296 nobody    15   0 74404 3708 1524 S  0.3  0.0   0:00.16 httpd
18519 nobody    15   0 74404 3700 1536 S  0.3  0.0   0:00.09 httpd
18718 nobody    15   0 74404 3712 1532 S  0.3  0.0   0:00.08 httpd
19109 nobody    15   0 74404 3664 1524 S  0.3  0.0   0:00.03 httpd
19333 nobody    15   0 74404 3608 1512 S  0.3  0.0   0:00.01 httpd
19351 nobody    15   0 74404 3616 1512 S  0.3  0.0   0:00.01 httpd
19359 nobody    15   0 74404 3640 1520 S  0.3  0.0   0:00.01 httpd
    1 root      15   0 10352  696  588 S  0.0  0.0   0:01.72 init
    2 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 migration/0
    3 root      34  19     0    0    0 S  0.0  0.0   0:00.01 ksoftirqd/0
    4 root      RT  -5     0    0    0 S  0.0  0.0   0:00.00 watchdog/0
    5 root      RT  -5     0    0    0 S  0.0  0.0   0:00.05 migration/1

If anyone can help.

Thank you.

1
  • I see a slightly-higher-than-ideal load average, but no other indications of a problem: Your CPUs are mostly idle & you're not swapping. Can you be more specific as to what issue(s) you're experiencing?
    – voretaq7
    Mar 10, 2011 at 16:29

1 Answer 1

4

A few things which caught my eye:

  • The CPU load figures aren't just a measure of CPU idle/usage rates. You can have a high load with relatively low CPU usages.
  • The 85.4%wa on CPU2 and the 'D' on the kjournald entry indicate something is waiting on disk IO to complete. Look into what processes are waiting for IO to figure out the course of action (I usually just watch top output for a bit).
  • You are using less than half your RAM. This is either due to the system not actually needing it (which is fine) or some misconfigured MySQL settings.
  • According to the top output MySQL's average CPU usage is only 5% (41m over 15hours). This would seem to indicate that it is not a lack of CPU.

The given information all seems to point at an IO issue. Use something like iotop to get more information on what is causing it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .