Tune Edge compaction and TsFile defaults - #18566
Merged
JackieTien97 merged 2 commits intoSep 1, 2026
Merged
Conversation
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.
Summary
Rationale
This follows the parameter suggestions from the Edge distribution mailing-list discussion, with the file-size policy adjusted using an empirical Edge workload instead of applying every suggested value verbatim.
The Edge process uses a 224 MiB maximum heap. With the current memory ratios, one active aligned MemTable with 100 DOUBLE measurements flushed every 25,000 rows in the probe. Each flush contained 20,300,000 bytes of logical MemTable data.
With deterministic data calibrated to an observed 5.08x compression ratio, each natural flush produced an approximately 4.02 MB TsFile. A 32 MiB compaction target paired with eight candidate files therefore creates an approximately 32 MB stable first-level file.
The inner and cross-space input-size limits remain at 50 MiB. This intentionally prevents two approximately 32 MB files from being compacted again into one approximately 64 MB file for a single-device workload, avoiding an additional write-amplification level while still bounding every task. The aligned-series batch of 2 and the smaller chunk/page targets bound temporary memory during compaction and file writing. All overrides remain isolated to the Edge archive.
Empirical validation
Workload: one aligned device, 100 DOUBLE measurements using GORILLA and LZ4, 400,000 rows and 40,000,000 values in total.
Build and integration validation