PDA

View Full Version : cpu usage jumps up and down



Secret Agent
4th November 2004, 12:29 AM
Not sure why but the "cpu" usage in WHM (web host manager, cpanel) shows the status in green / red on and off randomly yet frequently.

I ran top and got this:

top - 18:19:06 up 71 days, 15:28, 1 user, load average: 3.96, 3.97, 3.31
Tasks: 187 total, 2 running, 185 sleeping, 0 stopped, 0 zombie
Cpu(s): 22.0% us, 31.1% sy, 0.0% ni, 46.7% id, 0.0% wa, 0.0% hi, 0.2% si
Mem: 2074720k total, 1860492k used, 214228k free, 168076k buffers
Swap: 1807304k total, 376972k used, 1430332k free, 917996k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
16425 mysql 25 0 47656 11m 3756 R 99.4 0.6 0:12.97 mysqld
2 root RT 0 0 0 0 S 2.3 0.0 106:21.20 migration/0
27502 nobody 15 0 31464 19m 15m S 1.3 1.0 0:32.86 httpd
27534 nobody 15 0 30508 19m 15m S 1.3 0.9 0:29.04 httpd
13557 nobody 15 0 21428 11m 12m S 1.3 0.6 0:02.19 httpd
16473 nobody 16 0 20656 11m 12m S 1.3 0.5 0:00.08 httpd
16474 nobody 15 0 20628 11m 12m S 1.3 0.5 0:00.08 httpd
32580 nobody 15 0 22712 13m 12m S 1.0 0.7 0:06.69 httpd
16504 nobody 15 0 20168 10m 12m S 1.0 0.5 0:00.07 httpd
16532 nobody 16 0 20700 10m 12m S 1.0 0.5 0:00.03 httpd
16059 root 16 0 2632 964 1620 R 0.7 0.0 0:00.68 top


second time:

top - 18:22:03 up 71 days, 15:31, 1 user, load average: 2.15, 3.14, 3.10
Tasks: 158 total, 2 running, 156 sleeping, 0 stopped, 0 zombie
Cpu(s): 17.2% us, 18.4% sy, 0.0% ni, 64.1% id, 0.0% wa, 0.0% hi, 0.2% si
Mem: 2074720k total, 1817580k used, 257140k free, 168244k buffers
Swap: 1807304k total, 376972k used, 1430332k free, 920936k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
17561 mysql 25 0 47388 11m 3756 R 99.4 0.6 0:03.82 mysqld
5576 nobody 15 0 22756 13m 12m S 9.3 0.7 0:07.27 httpd
17204 nobody 15 0 22316 12m 12m S 6.3 0.6 0:00.45 httpd
5416 nobody 15 0 26464 14m 15m S 4.3 0.7 0:04.10 httpd
17457 nobody 15 0 31552 20m 15m S 3.6 1.0 0:55.28 httpd
17459 nobody 15 0 31760 20m 15m S 1.7 1.0 0:57.02 httpd
26085 nobody 15 0 30520 18m 15m S 1.3 0.9 0:32.76 httpd
17511 nobody 15 0 31356 19m 15m S 0.7 1.0 0:55.30 httpd
6126 nobody 15 0 22560 13m 12m S 0.7 0.6 0:03.21 httpd
17434 root 16 0 3376 968 1620 R 0.7 0.0 0:00.17 top
17563 nobody 16 0 20700 10m 12m S 0.7 0.5 0:00.02 httpd
17566 nobody 15 0 20652 10m 12m S 0.7 0.5 0:00.02 httpd
2 root RT 0 0 0 0 S 0.3 0.0 106:22.16 migration/0
8 root RT 0 0 0 0 S 0.3 0.0 64:23.81 migration/3
30063 mysql 15 0 47388 11m 3756 S 0.3 0.6 1:06.12 mysqld
30071 mysql 15 0 47388 11m 3756 S 0.3 0.6 0:22.70 mysqld
27542 root 16 0 3880 1548 2788 S 0.3 0.1 2:06.23 antirelayd
5285 root 16 0 20056 9948 12m S 0.3 0.5 0:22.76 httpd
13557 nobody 16 0 21428 11m 12m S 0.3 0.6 0:02.91 httpd
1 root 15 0 2740 328 1316 S 0.0 0.0 2:08.27 init
3 root 34 19 0 0 0 S 0.0 0.0 0:24.13 ksoftirqd/0
4 root RT 0 0 0 0 S 0.0 0.0 2:01.01 migration/1
5 root 34 19 0 0 0 S 0.0 0.0 0:00.91 ksoftirqd/1


I installed one jsp serverlet (only one total on server) yesterday, not sure if that may cause it.

Specs:
dual xeon 2.4ghz ht
2gb ecc ram
fedora core 2
cpanel / whm

Thanks :)

Dog-One
4th November 2004, 12:55 AM
Can you tell what it is that mySQL is chewing on?

Secret Agent
4th November 2004, 01:12 AM
That's the thing. How can I check this?

in WHM this is the cpu/memory/mysql usage (top part only)

User Domain %CPU %MEM Mysql Processes
mysql 80.21 6.89 0.0
Top Process %CPU 99.9 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/server.mydomain1.com.pid --skip-locking --port3306
Top Process %CPU 98.8 /usr/sbin/mysqld --basedir/ --datadir/var/lib/mysql --usermysql --pid-file/var/lib/mysql/server.mydomain1.com.pid --skip-locking --port3306
kalist ks.com 5.37 3.95 0.2
Top Process %CPU 99.9 /usr/bin/perl ikonboard.cgi
Top Process %CPU 75.0 /usr/bin/perl ikonboard.cgi
Top Process %CPU 61.0 /usr/bin/perl ikonboard.cgi
root 4.68 11.20 2.0
Top Process %CPU 98.6 gzip
Top Process %CPU 85.8 gzip
Top Process %CPU 77.2 gzip

Jman
5th November 2004, 05:03 AM
The mysqladmin tool may help in getting mysqld information.