gpt4 book ai didi

Mysql 5.6.10配置

转载 作者:可可西里 更新时间:2023-11-01 07:34:20 25 4
gpt4 key购买 nike

数据库服务器

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 of 3000 concurrent clients the mysqld does not seem to pull all the resources posibles from the machine.

New relic

我看到负载为 40,但 cpu 似乎没有超过 60%

That reflects in the front end server

enter image description here

**我的问题很明确,如何在不影响服务器的情况下提高性能?还有如何减少前端服务器的 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告诉你调皮的query。

关于Mysql 5.6.10配置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38765807/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com