views:

157

answers:

2

I have around 3 websites residing in a server which is being shared with other teams. I have been notified that there is a huge increase in CPU usage and we need to lower it down. I doubt my websites are causing this.

I have been using SHOW FULL PROCESSLIST in MySQL and 90% of the time shows queries from other databases. But I think executing multiple SHOW FULL PROCESSLIST commands is not enough proof. How can I verify that my databases aren't CPU hogs?

+1  A: 

If you suspect that its a MySQL query, try inspecting the MySQL Slow Query Log. The log will help you identify queries that take long time to execute. You can then copy-paste the query text into a MySQL query session, execute it and observe the CPU usage.

Salman A
A: 

You may also want to install different MySQL release, that allows to track exact user statistics and some other things:

http://www.mysqlperformanceblog.com/2008/07/16/mysql-releases-with-percona-patches/

FractalizeR