Mysql 5.6.10 configuration

Database server

16 cores 
63Gb RAM 
CentOS release 6.8

etc. /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 from 3000 simultaneous clients, mysqld does not seem to pull all resources from the machine.

New relic

I see a load of 40, but the processor does not seem to overcome 60%

This is reflected on the external server.

enter image description here

** My question is clear, how can I improve performance without compromising the server? You can also reduce the MYSQL wait time on an external server, since there is clearly a problem with the configurations on the server side of the database. **

**

UPDATE After investigation, the problem seems to be related to slow queries, so I’ll assume that this configuration is optimal for this equipment

**

+4
source share
2 answers

, . , my.cnf - .

- . .

, long_query_time = 1, , , pt-query-digest, .

+2

max_connections 700. , 3000 ? . , , .

SHOW PROCESSLIST; , , , Too many connections mysql.

max_connections, . MySQL , .

+1

Source: https://habr.com/ru/post/1650158/


All Articles