Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

MySQL is eating up about 80% of my CPU for no reason as far as I can see. Right now this server is rarely used, more of a test site I set up that will eventually be a used for production once I fix small problems like this. I run 3 instances of MySQL but it seems that my first instance is taking up all the CPU. When I turn off the first instance and leave the other two on everything runs fine.

Any suggestions?

I tried Show Processlist and no statements are being run besides "Sleep" and the query "Show Processlist" (obviously) at the time it's using up all this CPU.

my.cnf is basic. I did not optimize or change any MySQL settings. Do you think this would cause such strange behavior?

The machine is running Linux Centos 5.7 64 bit and MySQL 5.0.95.

Thanks

share|improve this question
    
Try "ps -eLf | grep -i mysql | less -S" to see which thread is the one using the CPU –  golimar Feb 28 '12 at 14:29
    
I type that command and a bunch of lines show up, what exactly am I looking for? –  Robert Feb 28 '12 at 14:48
    
In column 5 check for a high value, that's the thread you want; column 4 is its LWP or thread id –  golimar Feb 28 '12 at 15:01
    
ok its the first instance it has a value of "76". –  Robert Feb 28 '12 at 15:47
    
try to get information about the thread, in the /proc/<LWP> directory –  golimar Feb 28 '12 at 16:57

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.