mysql8.0.18 innodb_buffer_pool_size 配置文件
innodb_buffer_pool_size 在my.cnf配置后在数据库中show variables 显示的值不一致。测试过程;
my.conf配置 show variables显示
1497156608 2147483648
2497156608 3221225472
3497156608 4294967296
4497156608 5368709120
如果带单位就显示正常
my.conf配置 show variables显示
1G 1073741824
2G 2147483648
3G 3221225472
4G 4294967296
现象是如果设置的参数没有带单位,在数据库启动时显示的值偏大。求分析。
官方文档说明:
Buffer pool size must always be equal to or a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances. If you alter the buffer pool size to a value that is not equal to or a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances, buffer pool size is automatically adjusted to a value that is equal to or a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances.
https://dev.mysql.com/doc/refman/8.0/en/innodb-parameters.html#sysvar_innodb_buffer_pool_size
大概意思就是,所设置的innodb_buffer_pool_size大小必须是innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances的倍数,如果不是的话,将会自动调整
Maskfanatics 发表于 2022-10-12 09:15
官方文档说明:
Buffer pool size must always be equal to or a multiple of innodb_buffer_pool_ ...
是的,而且记得它是向上调整 my.cnf里用第二种方法设置就好,带M\G单位的那种,没必要搞那么精确(麻烦)
页:
[1]