7

I noticed that MySQL is using way more CPU than usual on my workstation (usual is 1% or less, because this is my workstation, not a server).

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                   
14004 mysql     20   0  536m  44m 7136 S  141  1.2  65:24.72 mysqld           

I looked in my slow log and there are no queries at all. I ran tail -f on the general log to see what was running and there was nothing at all there either. The MySQL processlist is empty as well.

+-----+------+-----------+----+---------+------+-------+------------------+
| Id  | User | Host      | db | Command | Time | State | Info             |
+-----+------+-----------+----+---------+------+-------+------------------+
| 165 | root | localhost |    | Query   | 0    |       | show processlist |
+-----+------+-----------+----+---------+------+-------+------------------+

Every other post I've seen is related to high CPU usage due to a specific query, but I've got no queries running at all. Does anyone know how to determine why MySQL is using all that CPU?

In case it matters, here's more info about my system:

Linux kubuntu 3.2.0-26-generic

Server version          5.5.24-0ubuntu0.12.04.1-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/run/mysqld/mysqld.sock
Uptime:                 57 min 8 sec

Threads: 1  Questions: 406  Slow queries: 0  Opens: 567  Flush tables: 1  
Open tables: 140  Queries per second avg: 0.118
0

1 Answer 1

9

had the same problem, here is a solution:

http://blog.mozilla.org/it/2012/06/30/mysql-and-the-leap-second-high-cpu-and-the-fix/

Everything happens because of "1" second.

2
  • The most recent "leap second" was triggered on July 1st 2015 (see hpiers.obspm.fr/iers/bul/bulc/bulletinc.49). I just noticed my MySql-Daemon spinning (probably going unnoticed for several days). Following the instructions helped! Commented Jul 7, 2015 at 22:55
  • URL doesn't Exist. Commented Dec 12, 2023 at 23:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.