Mysql 5.6.10配置
作者:互联网
DB服务器
16 cores
63Gb RAM
CentOS release 6.8
等/ my.cnf中
[mysqld]
pid_file=/var/lib/mysql/fatty01.pid
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
innodb_buffer_pool_size = 50G
innodb_log_file_size = 2G
innodb_flush_log_at_trx_commit = 0
sync_binlog = 0
innodb_flush_method = O_DIRECT
innodb_buffer_pool_instances = 16
innodb_thread_concurrency = 16
skip_name_resolve = 1
innodb_io_capacity = 4000
innodb_io_capacity_max = 6000
innodb_buffer_pool_dump_at_shutdown = 1
innodb_buffer_pool_load_at_startup = 1
query_cache_size = 0
query_cache_type = OFF
innodb_checksum_algorithm = crc32
table_open_cache_instances = 16
innodb_read_io_threads = 20
innodb_write_io_threads = 10
max_connections = 700
when we have peaks of 3000 concurrent clients the mysqld does not seem
to pull all the resources posibles from the machine.
我看到负载在40但cpu似乎没有超过60%
That reflects in the front end server
**
我的问题很明确,如何在不影响服务器的情况下提高性能?另外,如何减少前端服务器中的MYSQL等待时间,因为数据库服务器端的配置显然存在问题.
**
**
UPDATE After research the problem seem to be in the slow queries, so I
guess this configuration is optimal for this hardware
**
解决方法:
不,它不太可能是一个简单的调整改变.正如我所说,my.cnf看起来不错 – 基于有限的信息.
根据图表,突然发生了一些事情.或者是一连串的活动.
打开slowlog,设置long_query_time = 1,等到问题再次发生,然后使用pt-query-digest告诉你顽皮的查询.
标签:mysql,centos,database-performance,my-cnf 来源: https://codeday.me/bug/20190628/1310457.html