0

I have big cpu caused by mysql, 3 vcores, centos 6 64bits

http://s3.postimg.org/z8l73e98z/mysql.png

[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
symbolic-links=0
max_connections=200
max_user_connections=30
wait_timeout=30
interactive_timeout=50
long_query_time=5
#log-queries-not-using-indexes
#log-slow-queries=/var/log/mysql/log-slow-queries.log

#innodb_use_native_aio = 0
innodb_file_per_table

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid

+----------------+-------------------+-------------------+-------------------+
| Storage Engine | Data Size         | Index Size        | Total Size        |
+----------------+-------------------+-------------------+-------------------+
| InnoDB         |           1.81 MB |         256.00 KB |           2.06 MB |
| Total          |           1.81 MB |         256.00 KB |           2.06 MB |
+----------------+-------------------+-------------------+-------------------+
2 rows in set (0.08 sec)

Running process right now not when was cpu 7

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0  19364   436 ?        Ss   Mar12   0:00 init
root         2  0.0  0.0      0     0 ?        S    Mar12   0:00 [kthreadd/95734]
root         3  0.0  0.0      0     0 ?        S    Mar12   0:00 [khelper/95734]
root         4  0.0  0.0      0     0 ?        S    Mar12   0:00 [rpciod/95734/0]
root         5  0.0  0.0      0     0 ?        S    Mar12   0:00 [rpciod/95734/1]
root         6  0.0  0.0      0     0 ?        S    Mar12   0:00 [rpciod/95734/2]
root         7  0.0  0.0      0     0 ?        S    Mar12   0:00 [rpciod/95734/3]
root         8  0.0  0.0      0     0 ?        S    Mar12   0:00 [nfsiod/95734]
dbus       559  0.0  0.0  21540   316 ?        Ss   Mar12   0:00 dbus-daemon --system
root       639  0.0  0.0 117332   876 ?        Ss   Mar12   0:01 crond
root       682  0.0  0.0   4068    88 tty1     Ss+  Mar12   0:00 /sbin/mingetty     console
root       683  0.0  0.0   4068    88 tty2     Ss+  Mar12   0:00 /sbin/mingetty tty2
root       687  0.0  0.0   4068    84 tty3     Ss+  Mar12   0:00 /sbin/mingetty /dev/tty3
root       689  0.0  0.0   4068    84 tty4     Ss+  Mar12   0:00 /sbin/mingetty /dev/tty4

How to fix this ? If you need some more information just say.

Thanks.

  • 1) Is your data all InnoDB? 2) How much RAM on the DBServer? 3) How much data for you have? – RolandoMySQLDBA Mar 13 '15 at 15:49
  • 3) 35,994 InnoDB , how i can check 1) and 2) ? – nikolr8 Mar 13 '15 at 16:16
  • Never mind on #2. I see 4G in the picture you sent (4194304k total) – RolandoMySQLDBA Mar 13 '15 at 16:18
  • For #1, go to my old post dba.stackexchange.com/questions/8661/…, scroll down to the bold title UPDATE 2015-01-16 14:46 EST look for the first query entitled Total MySQL Data and Index Usage By Storage Engine. Copy and paste that query to run it. I post the results in the question, please. – RolandoMySQLDBA Mar 13 '15 at 16:21
  • i edit question and add there result, please check – nikolr8 Mar 13 '15 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.