-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage: Merge multiple segments in gc thread #5863
Merged
+434
−166
Merged
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
0bfd061
move ingest out
breezewish 9d52cdc
move internal segment ops out
breezewish 72b9c28
Re-format
breezewish 7de2a21
Avoid including DeltaMergeStore.h
breezewish 366cb81
Fix (1)
breezewish d720dee
Merge remote-tracking branch 'origin/master' into wenxuan/dm_pimpl
breezewish 47ea426
wip
breezewish 2243b0e
grumble
breezewish 31c8e63
protect against non-insertable segment ranges
breezewish 56b9a43
Add unit tests for segment merge
breezewish 6d5ff10
Reformat
breezewish a9008d1
Merge remote-tracking branch 'origin/master' into wenxuan/merge_multiple
breezewish 9a97537
Fix issues reported by static analysis
breezewish 6b05d0e
Merge branch 'master' into wenxuan/merge_multiple
JaySon-Huang 9b4f09e
Address comments
breezewish 4f6235e
refactor: Move storage bg out
breezewish e774078
Merge remote-tracking branch 'origin/master' into wenxuan/split_bg
breezewish d1f7d25
storage: merge in gc thread
breezewish 3aa728c
Merge remote-tracking branch 'origin/master' into wenxuan/merge_in_gc
breezewish daa0eb8
Add tests
breezewish 1466932
Merge remote-tracking branch 'origin/master' into wenxuan/merge_in_gc
breezewish 69cd880
Verify the snapshot and the segment as usual
breezewish 436a61c
Address comments
breezewish e37ff2d
Merge branch 'master' into wenxuan/merge_in_gc
lidezhu 4b53fea
Merge branch 'master' into wenxuan/merge_in_gc
breezewish df80965
Merge remote-tracking branch 'origin/master' into wenxuan/merge_in_gc
breezewish e4ffe56
Merge branch 'master' into wenxuan/merge_in_gc
ti-chi-bot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems the previous limit of merge threshold is
settings.dt_segment_limit_rows / 3 + settings.dt_segment_limit_rows / 5
which is aboutsettings.dt_segment_limit_rows / 2
, is this change intentional?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. In my ingestion test small sized segments (around 100MiB) is 25% faster than normal sized segments.
/3
will keep these small sized segments not merged together. However I would admit that controlling the performance using this parameter is a bit hack before we are clear why small sized segments is so much faster.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is really interesting. We definitely should find out why smaller segments help performance.
settings.dt_segment_limit_rows / 3
looks good to me now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is smaller segments more suitable for read thread pool? @JinheLin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about changing back to
/2
(as changing back would not bring performance regressions, just be the same as previous segment structure) to be more conservative? Then, we can have sufficient time to study what is really causing it to be fast(er)?