MYSQL占用高

上一次按照师兄们的建议,修改了配置文件,但是现在通过dstat监控查看还是cpu忽高忽低。。但是show processlist又没有什么卡主的语句。很奇怪,求师兄们帮忙分析一下。。
 
mysql版本:5.5.44-log
机器配置:
内存
[root@DBServer1 db9018]# free -m
total       used       free     shared    buffers     cached
Mem:         15947      14755       1192          3          7         61
-/+ buffers/cache:      14686       1260
Swap:         8191        197       7994
 
CPU:
[root@DBServer1 db9018]# lscpu
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                16
On-line CPU(s) list:   0-15
Thread(s) per core:    1
Core(s) per socket:    2
Socket(s):             8
NUMA node(s):          8
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 37
Stepping:              1
CPU MHz:               2133.409
BogoMIPS:              4266.81
Hypervisor vendor:     VMware
Virtualization type:   full
L1d cache:             32K
L1i cache:             32K
L2 cache:              256K
L3 cache:              24576K
NUMA node0 CPU(s):     0-15
NUMA node1 CPU(s):
NUMA node2 CPU(s):
NUMA node3 CPU(s):
NUMA node4 CPU(s):
NUMA node5 CPU(s):
NUMA node6 CPU(s):
NUMA node7 CPU(s):
 
 
 
mysql的配置文件:
[root@DBServer1 db9018]# cat my.cnf
[client]
#password       = your_password
port            = 9018
socket          = /home/mysql/db9018/mysql.sock


# The MySQL server
[mysqld]
port            = 9018
socket          = /home/mysql/db9018/mysql.sock
pid-file        = /home/mysql/data9017/mysql9018.pid
log-bin=mysql-bin
server-id=17
skip-external-locking
key_buffer_size = 256M
max_allowed_packet = 16M
table_open_cache = 1024
join_buffer_size = 16M
sort_buffer_size = 16M
read_buffer_size = 8M
read_rnd_buffer_size = 64M
thread_cache_size = 16
query_cache_size= 0
query_cache_type= 0
max_tmp_tables = 256
tmp_table_size = 128M
max_heap_table_size=128M
thread_cache_size=32
binlog_format=row
thread_concurrency =16
max_connections         = 15000
max_user_connections    = 0
max_connect_errors      = 99999999
wait_timeout            = 1800
interactive_timeout     = 1800
slow_query_log          = 1
long_query_time         = 1
slow_query_log_file     = slow-queries.log
back_log                = 600
expire_logs_days        = 7
skip-name-resolve
lower_case_table_names = 1
init-connect='SET NAMES utf8'
character-set-server=utf8
skip-character-set-client-handshake
server-id=225


# Myisam specific options
myisam_repair_threads   = 1
myisam-recover          = DEFAULT
myisam_sort_buffer_size = 64M

# innodb configuration
innodb_buffer_pool_size = 12G
innodb_log_buffer_size = 32M
innodb_write_io_threads = 8
innodb_read_io_threads = 8
innodb_log_file_size = 512M
innodb_log_files_in_group = 2

[mysqldump]
quick
max_allowed_packet = 16M

[mysql]
no-auto-rehash
prompt="\\u@\\h:\\p [\\d]>"
# Remove the next comment character if you are not familiar with SQL
#safe-updates

[myisamchk]
key_buffer_size = 128M
sort_buffer_size = 128M
read_buffer = 2M
write_buffer = 2M

[mysqlhotcopy]
interactive-timeout
 
 
perf top的结果:

Snip20180121_107.png



dstat的结果

Snip20180121_108.png

 
 
已邀请:

要回复问题请先登录注册