[seekdb][tx] Reduce tx data memtable initial hash buckets - #1206
Open
hnwyllmm wants to merge 2 commits into
Open
[seekdb][tx] Reduce tx data memtable initial hash buckets#1206hnwyllmm wants to merge 2 commits into
hnwyllmm wants to merge 2 commits into
Conversation
Member
Author
|
The mapping Dima issue is about adjusting the memtable_arena parameter. |
Member
Author
Local idle-memory A/B resultI re-ran the idle-memory comparison on the current host because the previous cloud host is no longer available. Method
Allocator dump
The changed object is the newly created ACTIVE tx-data memtable bucket array. The MINI memtable restored from the same base directory and the 7,936-byte arena object remained unchanged, so the entire 768 KiB delta is directly attributable to this change. This also agrees with the earlier adjacent idle-PSS observation of 718 KiB. Binary SHA256
|
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.
Task Description
The tx data memtable hash map starts with 65,536 buckets. Each bucket header is 16 bytes, so an active memtable reserves 1 MiB for the bucket array even when the transaction count is low.
Solution Description
Reduce
ObTxDataHashMap::MIN_BUCKETS_CNTfrom 65,536 to 16,384. This lowers the initial bucket array from 1 MiB to 256 KiB while retaining the existing adaptive expansion and shrink logic.Passed Regressions
oltp_update_non_indexrounds on a 16-vCPU host, with 8 CPUs assigned to seekdb and 8 CPUs assigned to sysbench.git diff --checkandgit diff --cached --checkpassed.Upgrade Compatibility
Compatible. This only changes the initial in-memory bucket allocation and does not modify persisted data, file formats, SQL behavior, or public APIs.
Other Information
This MR contains one commit:
6da09f27dbe reduce tx data memtable initial bucket count. The unrelated untracked file2is not included.Release Note