innodb_buffer_pool_size参数大小建议:
查看Innodb_buffer_pool_pages_data大小,即已使用页面
MySQL> SHOW GLOBAL STATUS LIKE ‘Innodb_buffer_pool_pages_data‘;
查看Innodb_buffer_pool_pages_total大小,总计页面
mysql>SHOW GLOBAL STATUS LIKE ‘Innodb_buffer_pool_pages_total‘;
按如下结算设置
‘Innodb_buffer_pool_pages_data‘ X 100 / ‘Innodb_buffer_pool_pages_total‘
当结果 > 95% 则增加 innodb_buffer_pool_size, 建议使用物理内存的total 75%
当结果 < 95% 则减少 innodb_buffer_pool_size,
时间: 2024-10-08 00:30:25