Mysql process goes over 100% of CPU usage

Posted by Temnovit on Server Fault See other posts from Server Fault or by Temnovit
Published on 2011-01-08T19:47:58Z Indexed on 2011/01/08 19:55 UTC
Read the original article Hit count: 177

Filed under:
|

Hello!

I'm experiencing some problems with my LAMP server. Recently, everything became very slow, even though visitor count on my websites didn't change to much. When I run top command, it sais that mysql process has taken over 150-200% of CPU. How's that possible, I always thought that 100% is a maximum?

I'm running Ubuntu 9.04 server edition with 1,5 GB RAM

my.cnf settings:

key_buffer      = 64M
max_allowed_packet  = 16M
thread_stack        = 192K
thread_cache_size       = 8

myisam-recover         = BACKUP
max_connections        = 200
table_cache            = 512
table_definition_cache = 512
thread_concurrency     = 2

read_buffer_size = 1M
sort_buffer_size = 4M
join_buffer_size = 1M

query_cache_limit   = 1M  # the maximum size of individual query results
query_cache_size    = 128M

Here is the output of MySQLTuner:

MySQLTuner output

The top command:

top output

What could be the cause of this problem? Can I make changes to my my.cnf to prevent server from hanging?

© Server Fault or respective owner

Related posts about mysql

Related posts about Performance