GreatSQL社区

搜索

[已解决] mysql8.0.18 innodb_buffer_pool_size 配置文件

624 3 2022-10-11 19:45
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
现象是如果设置的参数没有带单位,在数据库启动时显示的值偏大。求分析。




全部回复(3)
Maskfanatics 2022-10-12 09:15:28
官方文档说明:
        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的倍数,如果不是的话,将会自动调整
yejr 2022-10-20 16:39:55
Maskfanatics 发表于 2022-10-12 09:15
官方文档说明:
        Buffer pool size must always be equal to or a multiple of innodb_buffer_pool_ ...

是的,而且记得它是向上调整
yejr 2022-10-20 16:40:40
my.cnf里用第二种方法设置就好,带M\G单位的那种,没必要搞那么精确(麻烦)
wumin214xf

1

主题

0

博客

2

贡献

新手上路

Rank: 1

积分
3

合作电话:010-64087828

社区邮箱:greatsql@greatdb.com

社区公众号
社区小助手
QQ群
GMT+8, 2024-5-19 03:26 , Processed in 0.015773 second(s), 11 queries , Redis On.
快速回复 返回顶部 返回列表