MDEV-18726: innodb buffer pool size not consistent with large pages
Rather than add a small extra amount on the size of chunks, keep it of the specified size. The rest of the chunk initialization code adapts to this small size reduction. This has been made in the general case, not just large pages, to keep it simple. The chunks size is controlled by innodb-buffer-pool-chunk-size. In the code increasing this by a descriptor table size length makes it difficult with large pages. With innodb-buffer-pool-chunk-size set to 2M the code before this commit would of added a small amount extra to this value when it tried to allocate this. While not normally a problem it is with large pages, it now requires addition space, a whole extra large page. With a number of pools, or with 1G or 16G large pages this is quite significant. By removing this additional amount, DBAs can set innodb-buffer-pool-chunk size to the large page size, or a multiple of it, and actually get that amount allocated. Previously they had to fudge a value less. The innodb.test results show how this is fudged over a number of tests. With this change the values are just between 488 and 500 depending on architecture and build options. Tested with --large-pages --innodb-buffer-pool-size=256M --innodb-buffer-pool-chunk-size=2M on x86_64 with 2M default large page size. Breaking before buf_pool init, one large page was allocated in MyISAM, by the end of the function 128 huge pages where allocated as expected. A further 16 pages where allocated for a 32M log buffer and during startup 1 page was allocated briefly to the redo log.
Showing
Please register or sign in to comment