Mysql high cpu
Hi not sure why mysql is having high cpu usage.
I've ran mysqltuner and still does not work.
192149 mysql 20 0 13.7g 2.8g 6024 S 131.7 36.1 283:34.43 mysqld
It's quite strange as if I look at the mysqladmin processlist I get this:
+--------+----------------+-----------+--------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+
| Id | User | Host | db | Command | Time | State | Info | Progress |
+--------+----------------+-----------+--------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+
| 206827 | root | localhost | information_schema | Sleep | 20 | | | 0.000 |
| 206829 | root | localhost | information_schema | Sleep | 4609 | | | 0.000 |
| 206831 | root | localhost | information_schema | Sleep | 4610 | | | 0.000 |
| 211870 | bmxdirec_wp | localhost | bmxdirec_wordpress | Query | 0 | Sending data | SELECT * FROM wp_options LIMIT 10 OFFSET 298590 | 0.000 |
| 214431 | eximstats | localhost | eximstats | Sleep | 1 | | | 0.000 |
| 215115 | root | localhost | mysql | Query | 64 | Opening tables | SELECT TABLE_SCHEMA as DB,SUM(DATA_LENGTH)+SUM(INDEX_LENGTH) AS SPACEUSED from information_schema.ta | 0.000 |
| 215234 | stirling_wp315 | localhost | stirling_wp315 | Sleep | 2 | | | 0.000 |
| 215236 | atomicco_wp833 | localhost | atomicco_wp833 | Sleep | 0 | | | 0.000 |
| 215238 | root | localhost | | Query | 0 | init | show processlist | 0.000 |
+--------+----------------+-----------+--------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+
Any ideaS?
-
Hi not sure why mysql is having high cpu usage. I've ran mysqltuner and still does not work. 192149 mysql 20 0 13.7g 2.8g 6024 S 131.7 36.1 283:34.43 mysqld It's quite strange as if I look at the mysqladmin processlist I get this: +--------+----------------+-----------+--------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+ | Id | User | Host | db | Command | Time | State | Info | Progress | +--------+----------------+-----------+--------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+ | 206827 | root | localhost | information_schema | Sleep | 20 | | | 0.000 | | 206829 | root | localhost | information_schema | Sleep | 4609 | | | 0.000 | | 206831 | root | localhost | information_schema | Sleep | 4610 | | | 0.000 | | 211870 | bmxdirec_wp | localhost | bmxdirec_wordpress | Query | 0 | Sending data | SELECT * FROM wp_options LIMIT 10 OFFSET 298590 | 0.000 | | 214431 | eximstats | localhost | eximstats | Sleep | 1 | | | 0.000 | | 215115 | root | localhost | mysql | Query | 64 | Opening tables | SELECT TABLE_SCHEMA as DB,SUM(DATA_LENGTH)+SUM(INDEX_LENGTH) AS SPACEUSED from information_schema.ta | 0.000 | | 215234 | stirling_wp315 | localhost | stirling_wp315 | Sleep | 2 | | | 0.000 | | 215236 | atomicco_wp833 | localhost | atomicco_wp833 | Sleep | 0 | | | 0.000 | | 215238 | root | localhost | | Query | 0 | init | show processlist | 0.000 | +--------+----------------+-----------+--------------------+---------+------+----------------+------------------------------------------------------------------------------------------------------+----------+ Any ideaS?
Hello Did you check mysql db size? here is the code you can check which db is too big.SELECT table_schema "database", sum(data_length + index_length)/1024/1024 "size in MB" FROM information_schema.TABLES GROUP BY table_schema;
Or simply try to repair a!! tables on db .0 -
I've ran mysqltuner and still does not work.
Hello, Did you make any changes suggested by the MySQL tuner? Do you have the output from it? Thank you.0
Please sign in to leave a comment.
Comments
2 comments