1. 更改MySQL Data File位置

datadir=/data/mysql
socket=/data/mysql/mysql.sock

2. 调整OS参数

* soft nproc 10240
* hard nproc 10240
* soft nofile 102400
* hard nofile 102400
* soft stack 10240
* hard stack 10240

3. 调整MySQL参数

innodb_buffer_pool_size = 300G # (adjust value here, 50%-70% of total RAM)
innodb_log_file_size = 256M
innodb_flush_log_at_trx_commit = 1 # may change to 2 or 0
innodb_flush_method = O_DIRECT
max_connections=10240
max_connect_errors=100000
open_files_limit=102400

4. 客户端配置调整

[client]
port=3306
socket=/data/mysql/mysql.sock

相关文章:

  • 2022-01-17
  • 2021-06-07
  • 2021-04-18
  • 2021-12-13
  • 2021-10-21
  • 2021-08-21
  • 2020-05-08
猜你喜欢
  • 2022-02-17
  • 2022-12-23
  • 2021-08-19
  • 2021-11-02
  • 2021-06-16
相关资源
相似解决方案