MySQL Forums
Forum List  »  Performance

MySQL using too much CPU
Posted by: 31 Special
Date: August 29, 2014 05:12PM

Hello,

What changes I should make to MySQL or CentOS that can greatly reduce my CPU usage?

Centos 6.5

32gb Ram

8 Core CPU

MySQL 5.1.73


top - 18:38:44 up 2:16, 3 users, load average: 0.05, 0.03, 0.05
Tasks: 199 total, 1 running, 198 sleeping, 0 stopped, 0 zombie
Cpu(s): 66.2%us, 18.9%sy, 0.0%ni, 14.9%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 32811000k total, 3072920k used, 29738080k free, 69784k buffers
Swap: 40959992k total, 0k used, 40959992k free, 2013240k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
4399 mysql 20 0 3151m 430m 4968 S 683.9 1.3 351:43.77 mysqld
1 root 20 0 19356 1544 1236 S 0.0 0.0 0:01.24 init
2 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kthreadd
3 root RT 0 0 0 0 S 0.0 0.0 0:00.26 migration/0




[mysqld]
datadir=/data/mysql_data
socket=/var/lib/mysql/mysql.sock
user=mysql
# Disabling symbolic-links is recommended to prevent assorted security risks
symbolic-links=0
bulk_insert_buffer_size=512M
myisam_sort_buffer_size=4G
max_binlog_size=128M

key_buffer = 32M
tmp_table_size = 32M
long_query_time=5
log-queries-not-using-indexes=1


thread_cache=32
wait_timeout=25
connect_timeout=10
max_connections=1024

query_cache_size = 128M
join_buffer_size = 2M
thread_cache_size = 4
table_cache = 2500
innodb_buffer_pool_size = 350M
slow_query_log=/data/mysql_log/slow.log


log-bin = /data/mysql_log/mysql-bin.log
binlog-do-db=centreon_storage
binlog-do-db=centreon_syslog
binlog-do-db=centreon_status
binlog-do-db=centreon
server-id=1


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

Options: ReplyQuote


Subject
Views
Written By
Posted
MySQL using too much CPU
2211
August 29, 2014 05:12PM
1003
August 30, 2014 05:27PM
1124
August 31, 2014 10:13PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.