mysql causing heavy load

bjseiler

Verified User
Joined
Jun 19, 2003
Messages
197
For about an hour, despite shutting down/restarting mysql, the mysqld process has been using a huge percentage of the CPU. It was at 98% for about 15 minutes. I tried logging into mysql as root and running show processlist, but that only listed one process. Is there another command I can use to figure out what is using all of the CPU?

Thanks!


last pid: 18979; load averages: 0.60, 0.86, 0.93 up 9+22:29:08 11:18:30
67 processes: 2 running, 64 sleeping, 1 zombie
CPU states: 52.5% user, 0.0% nice, 47.1% system, 0.4% interrupt, 0.0% idle
Mem: 113M Active, 147M Inact, 140M Wired, 36M Cache, 85M Buf, 299M Free
Swap: 1317M Total, 196K Used, 1317M Free

PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND
18913 mysql 117 0 36844K 25740K RUN 1:40 58.41% 58.40% mysqld
18961 apache 20 0 30936K 26312K lockf 0:00 0.20% 0.20% httpd
747 root 8 0 2196K 1120K nanslp 0:37 0.00% 0.00% da-popb4smtp
401 root 8 0 1344K 816K nanslp 0:27 0.00% 0.00% cron
247 root 96 0 1272K 672K select 0:14 0.00% 0.00% syslogd
 
Have you tried optimizing MySQL?
http://help.directadmin.com/item.php?id=44

You should be able to get a process list from the console logged into mysql as root (or da_admin) or even through phpmyadmin logged in as root.

The da_admin password can be found in /usr/local/directadmin/conf/mysql.conf
 
I did log into the mysql console but it only showed one process and that was for the da_admin user and it did not look abnormal. Before optimizing mysql in any way other than default, I would like to figure out what caused the load (like if it was a runaway script, etc.).
 
Back
Top