专用服务器只运行mysql,但只能使用20%的CPU,为什么?

时间:2016-04-03 16:50:46

标签: mysql

正如您所看到的,对于此服务器,CPU最多可以使用20%。即使mysql开始卡住也不会引起。这个服务器只运行mysql,因为这样的php nginx等在其他server.i中,假设my.conf中有一些错误,请帮忙。

在centos中输入“top”之后的

屏幕截图是流程

enter image description here

关于硬件,它是双至强E5-2620 V2。 32G RAM。

cat /proc/cpuinfo | grep name | cut -f2 -d: | uniq -c
24  Intel(R) Xeon(R) CPU E5-2620 v2 @ 2.10GHz
cat /proc/cpuinfo | grep "physical"| sort |uniq -c
24 address sizes    : 46 bits physical, 48 bits virtual
12 physical id  : 0
12 physical id  : 1

这是my.conf(mysql 5.6.14)

[mysqld]
port        = 3306
;socket      = /tmp/mysql.sock
log-error=/var/log/mysql-error.log
slow_query_log=1
;log_queries_not_using_indexes=1
;log-slow-queries=/var/log/mysql-slow.log
;log_slow_queries=1
;slow_query_log_file=/var/log/mysql-slow.log
;long_query_time=10
log-output=FILE
slow_query_log_file=/var/log/mysql-slow.log
;long-query-time=10
skip-external-locking
table_open_cache = 8192
max_allowed_packet = 1024M
table_definition_cache = 1024
max_connections = 1000
max_connect_errors = 10
max_heap_table_size =64M
sort_buffer_size = 8M
join_buffer_size = 1M
thread_cache_size = 64
thread_concurrency = 24
query_cache_size = 256M
query_cache_limit = 4M
tmp_table_size = 1024M
key_buffer_size = 5G
read_buffer_size = 2M
read_rnd_buffer_size = 16M
bulk_insert_buffer_size= 64M
myisam_sort_buffer_size = 128M
myisam_max_sort_file_size = 256M
myisam_repair_threads = 1
myisam_recover
innodb_additional_mem_pool_size = 1024M
innodb_log_buffer_size = 256M
innodb_log_file_size = 1024M
innodb_buffer_pool_size = 10G
[mysqlhotcopy]
interactive-timeout

感谢您的帮助!

0 个答案:

没有答案