PS-10595 [9.7]: Combined buffer-pool init speedup: lazy latch init + rwlock bulk register.#6058
Open
polchawa-percona wants to merge 1 commit into
Conversation
b8a062f to
195bf77
Compare
195bf77 to
81dd7cf
Compare
…tion https://perconadev.atlassian.net/browse/PS-10595 Combines two buffer-pool initialization speedups: 1. Reduce rw_lock_list contention during buffer pool initialization by registering block rw-locks in bulk via an O(1) list splice under rw_lock_list_mutex instead of taking it once per block. 2. Lazy per-block latch initialization - defer creation of each block's mutex and rw-locks until the block is first used. The second optimization is deferring the cost (paid later in runtime). Therefore it is disabled by default and a new sysvar has to be used to enable it: innodb_buffer_pool_lazy_latch_init. While it is disabled, the first optimization helps a little bit. These changes are based on a contribution we got from: Alexey Bychko <abychko@gmail.com>
81dd7cf to
9b59ed0
Compare
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.
https://perconadev.atlassian.net/browse/PS-10595
https://perconadev.atlassian.net/browse/PS-11120
Combines two buffer-pool initialization speedups:
Reduce rw_lock_list contention during buffer pool initialization by
registering block rw-locks in bulk via an O(1) list splice under
rw_lock_list_mutex instead of taking it once per block.
Lazy per-block latch initialization — defer creation of each block's
mutex and rw-locks until the block is first used, gated by the new
innodb_buffer_pool_lazy_latch_init sysvar (disabled by default, since
it defers the cost to runtime). While it is disabled, the first
optimization still helps a little bit.
Also carries clang-tidy include-cleaner fixes: direct #includes added to
buf0buf.cc and sync0rw.cc so the include-cleaner step passes.
These changes are cherry-picked from a contribution we got from:
Alexey Bychko abychko@gmail.com