重要参数

2021-07-31  本文已影响0人  古飞_数据
max_connections
max_user_connextions
back_log
thread_pool_max_threads 
innodb_thread_concurrency
innodb_concurrency_tickets
sync_binlog    
innodb_flush_log_at_trx_commit

最大连接数,默认151,有效范围 1-100000,主从都需要单独设置

max_connections = 3000
max_user_connextions = 2980

256-64M 超出临时文件

innodb_buffer_pool

256k3000 = 760M
64M
3000 =192G

100台 300qps 20ms

300/50 =6个连接

back_log TCP/IP 三次握手

sysctl.conf

Innodb线程并发数
thread_pool_max_threads = 2000 //线程池 ,企业版,percona,Mariadb
innodb_thread_concurrency = 32 // 默认 0 ,看cpu个数

show engine innodb status;
show processlist;

innodb_concurrency_tickets = 5000 // CPU切片轮询数
双一参数,保证数据一致性
sync_binlog = 1
innodb_flush_log_at_trx_commit = 1
==============================================================

上一篇下一篇

猜你喜欢

热点阅读