Mysql – thesql – abnormally high CPU usage

MySQL

I have recently noticed that my MySQL server consumes abnormally large amount of CPU resources:

PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
2427 mysql     20   0 2198m 161m 5568 S 1600.0  4.4  5121391h /usr/sbin/mysqld --basedir=/ --datadir=/var/lib/mysql --user=mysql

I am attaching two files – one with my MySQL configuration and another with the mysqlreport output. MySQL error logs are clean. mytop shows few records but they are changed all of the time and it's difficult to understand if such overload is due to those records. Sometimes, the processes list is even empty.

I am also attaching my server details. I am going to think that top shows wrong info ).
Appreciate any help.

Best Answer

Stop looking at the system and start looking at what's happening to MySQL. Even the briefest glance at the report makes it clear that you have some incredibly inefficient queries. Work on proper indexing and optimisation and I believe your problems will go away.

Related Topic