Bug #80350 | Innodb allocates 7G more buffer pool size from given in my.cnf | ||
---|---|---|---|
Submitted: | 12 Feb 2016 8:20 | Modified: | 16 Mar 2016 14:54 |
Reporter: | Shahriyar Rzayev | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: Documentation | Severity: | S3 (Non-critical) |
Version: | 5.7.10 | OS: | CentOS (7) |
Assigned to: | CPU Architecture: | Any |
[12 Feb 2016 8:20]
Shahriyar Rzayev
[12 Feb 2016 8:55]
zhai weixiang
Check function buf_pool_size_align , it seems the real buffer pool size will be aligned with instances * chunk_unit...(which is 8GB in your test case) It's a documented behavior: http://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_buffer_pool_ch... Buffer pool size must always be a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances. If you alter innodb_buffer_pool_chunk_size, innodb_buffer_pool_size is automatically adjusted to a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances that is not less than current buffer pool size. The adjustment occurs when the buffer pool is initialized.
[12 Feb 2016 10:36]
Shahriyar Rzayev
Thanks for reply. I am a bit confused in related topic because of followings: http://dev.mysql.com/doc/refman/5.7/en/innodb-buffer-pool-online-resize.html "When you increase or decrease innodb_buffer_pool_size online, the operation is performed in chunks" -> it is about ONLINE resizing yes? but I am changing buffer pool size using config file as was in old days :) http://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_buffer_pool_ch... "The following conditions apply when altering the innodb_buffer_pool_chunk_size value: If innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances is larger than the current buffer pool size when the buffer pool is initialized, innodb_buffer_pool_chunk_size is truncated to innodb_buffer_pool_size / innodb_buffer_pool_instances. Buffer pool size must always be a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances. If you alter innodb_buffer_pool_chunk_size, innodb_buffer_pool_size is automatically adjusted to a multiple of innodb_buffer_pool_chunk_size * innodb_buffer_pool_instances that is not less than current buffer pool size. The adjustment occurs when the buffer pool is initialized." when altering the innodb_buffer_pool_chunk_size? Again I am not altering anything.
[12 Feb 2016 11:27]
Shahriyar Rzayev
So even same logic works for offline buffer pool resizing. The situation is quite messy for me: 1. I have requested 9G buff size(my.cnf) 2. It is in fact allocated 8G (See Zhai's comment) 3. From error log it is allocated 16G 4. From @@innodb_buffer_pool_size = 16G 5. From information_schema.INNODB_BUFFER_POOL_STATS = 16G 6. From engine status = 16G
[17 Feb 2016 16:00]
MySQL Verification Team
Many thanks to Zhai Weixiang who has cleared up the muddy waters for the bug reporter. It is supposed that user of MySQL database knows what he / she is doing when setting certain parameters. However, I did notice that this matter is not handled properly in our user manual. Hence, this is a verified documentation bug.
[16 Mar 2016 14:54]
Daniel Price
Posted by developer: The following sections have been revised: https://dev.mysql.com/doc/refman/5.7/en/innodb-buffer-pool-resize.html https://dev.mysql.com/doc/refman/5.7/en/innodb-parameters.html#sysvar_innodb_buffer_pool_s... Thank you for the bug report.