Repository navigation
feat(mysql-innodb-buffer-pool-size): show the pool usage, warn on waits for a free page - #1670
Open
NavidSassan wants to merge 1 commit into
Open
NavidSassan wants to merge 1 commit into
NavidSassan wants to merge 1 commit into
Conversation
…ts for a free page - Report how much of the buffer pool is in use and whether it is full, that is down to the reserve of free pages InnoDB keeps (innodb_lru_scan_depth, per instance on MySQL). New perfdata mysql_innodb_buffer_pool_bytes_data and _pct_used, new Grafana panel. - WARN when Innodb_buffer_pool_wait_free moved since the last check, --warning-waits (default 0) for servers where bulk loads may run into it. MariaDB from 10.6.18, 10.11.8 and 11.4.2 waits up to a second per count, older MariaDB and MySQL count every retry. - README: how the pool fills, how to read the numbers, how to size it. Verified on MariaDB 10.6.28, 10.11, 11.4.13, 11.8.9 and MySQL 8.0.46, 8.4.13, 9.3. "Full" with 8 buffer pool instances measured on MySQL 8.0.46 and 8.4.13 (1 GiB pool: 8192 to 9586 free pages when idle). A pool below about twice the reserve (48 MiB on MariaDB) is not reliably recognised as full.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds on 85dad20 (miss ratio). The miss ratio rule itself is unchanged.
What changes
innodb_lru_scan_depth, per instance on MySQL). Informational only. New perfdatamysql_innodb_buffer_pool_bytes_dataandmysql_innodb_buffer_pool_pct_used, new Grafana panel "Usage".Innodb_buffer_pool_wait_freemoved since the last check, with--warning-waits(default 0) for servers where bulk loads may run into it. MariaDB from 10.6.18, 10.11.8 and 11.4.2 waits up to a second per count, older MariaDB and MySQL count every retry.Verification
--innodb-lru-scan-depth=256, because a 32 MiB pool with the default reserve settles anywhere between 24% and 55% in use on MariaDB.Known limits
Not part of this PR, for discussion
Measured with a 64 MiB pool in front of 150 MiB of data, each phase 30 s:
Innodb_buffer_pool_reads(buf0rea.cc), so subtractingInnodb_buffer_pool_read_aheadremoves real misses there. With lookups and scans mixed, MariaDB 10.5.29 came to 8.4% instead of 12.1%.