Skip to content
MySQL教程
Appearance
Menu
Return to top
On this page
连接数与磁盘容量
连接数
max_connections
过小会
拒绝连接
;过大占内存(每连接有缓冲)。
应用
连接池
上限之和应
小于
服务端
max_connections
留余量给管理连接。
磁盘
datadir
、
binlog
、
临时文件
、
undo
均能撑满盘;盘满会导致
只读或崩溃
。
告警阈值
80%
提前扩容;
binlog 过期策略
与备份联动。
内存
innodb_buffer_pool_size
一般为物理内存
50%~70%
(视混合负载调整),勿与 OS 换页激烈争抢。