MySQLD High CPU Usage

shadowq

Verified User
Joined
Dec 5, 2010
Messages
82
I know this isn't a DirectAdmin problem (well, at least I think it isn't!) but the help here is great, so I thought I would try.

There are three mysqld threads on my VPS- one ALWAYS using around 80%, one ALWAYS around 45%, and one ALWAYS around 30%. Restarting the mysqld service removes the threads for a second, and they come straight back. Killing one of the threads results in all 3 dying and restarting.

I've tried using the default my.cnf, and all of the other my.cnf templates that DirectAdmin ships with- but they're all the same. I've ran
Code:
mysqladmin processlist
but the only process is itself
Code:
+--------+------+-----------+----+---------+------+-------+------------------+
| Id     | User | Host      | db | Command | Time | State | Info             |
+--------+------+-----------+----+---------+------+-------+------------------+
| 151689 | root | localhost |    | Query   | 0    |       | show processlist |
+--------+------+-----------+----+---------+------+-------+------------------+

Does anyone have any suggestions of how I can fix this? The node only has one other VPS running on it, which is hardly used. The VPS has 4GB of RAM allocated to it, and the node has over 10GB free and unallocated.

The node has Proxmox VE installed.
The VPS is using CentOS 6.2.

Code:
mysql -V
outputs:
Code:
mysql  Ver 14.14 Distrib 5.5.14, for Linux (x86_64) using readline 5.1

Any help would be much appreciated!

Thanks,
Jarrod.
 
Hello,

With that input data is almost impossible to give you any good and useful answer. Try this script http://mysqltuner.pl as it might help you. Also try to enable mysql slow logs (search the docs on MySQL website in order learn how to do that).
 
Hello,

With that input data is almost impossible to give you any good and useful answer. Try this script http://mysqltuner.pl as it might help you. Also try to enable mysql slow logs (search the docs on MySQL website in order learn how to do that).

Thanks for that zEitEr. I ran the mysqltuner.pl script- and made a lot of the suggested changes (output for mysqltuner.pl attached- is there anything in there I should be worried about?). However- running OPTIMIZE TABLE on all the tables produced a lot of "Table does not support optimize, doing recreate + analyze instead." and only lowered the fragmented tables by 50 or 60. Those 3 threads are still there.

I've enabled slow query logs, but nothing has been written to the log (no slow queries).

I ran the mysqltuner.pl on another server (with mysql version 5.0.67) that has the exact same databases on it (I migrated from that server to the new one), and compared the two outputs from mysqltuner.pl. There is nothing notably different.

Any other suggestions? Would posting my my.cnf help?
 

Attachments

Back
Top