Skip to content
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

splitstore sortless compaction #8008

Merged
merged 50 commits into from
Feb 9, 2022
Merged

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Jan 28, 2022

This implements sortless compaction, as outlined in #7137.
Closes #7137

The compaction algorithm is modified to store the coldset on disk and checkpoint deletions. Once the critical section starts, the markset is consulted on reads and an object is considered as missing from the hotstore if it is not in the markset, while write synchronously update the markset.

This results in significantly faster compaciton (40% of time was spent in sorting).
In addition, coupled with the badger markset, compaction now uses very little memory independent of coldset size, which makes it possible to use the splitstore in memory constrained systems.

@codecov
Copy link

codecov bot commented Jan 30, 2022

Codecov Report

Merging #8008 (e129ae3) into master (ff10e0e) will decrease coverage by 0.14%.
The diff coverage is 46.31%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8008      +/-   ##
==========================================
- Coverage   39.27%   39.12%   -0.15%     
==========================================
  Files         660      662       +2     
  Lines       71436    71922     +486     
==========================================
+ Hits        28054    28143      +89     
- Misses      38580    38887     +307     
- Partials     4802     4892      +90     
Impacted Files Coverage Δ
blockstore/splitstore/splitstore_check.go 0.00% <0.00%> (ø)
blockstore/splitstore/splitstore.go 22.97% <2.17%> (-4.12%) ⬇️
blockstore/splitstore/splitstore_compact.go 41.36% <28.51%> (-11.08%) ⬇️
blockstore/splitstore/markset_map.go 61.74% <57.14%> (-22.04%) ⬇️
blockstore/splitstore/checkpoint.go 67.74% <67.74%> (ø)
blockstore/splitstore/markset_badger.go 71.06% <73.25%> (+2.99%) ⬆️
blockstore/splitstore/coldset.go 82.00% <82.00%> (ø)
blockstore/splitstore/markset.go 75.00% <100.00%> (ø)
blockstore/splitstore/splitstore_warmup.go 52.63% <100.00%> (ø)
node/config/def.go 97.46% <100.00%> (ø)
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff10e0e...e129ae3. Read the comment docs.

@vyzo vyzo requested a review from magik6k February 2, 2022 12:45
@vyzo vyzo marked this pull request as ready for review February 2, 2022 12:46
@vyzo vyzo requested a review from a team as a code owner February 2, 2022 12:46
@vyzo vyzo changed the title [WIP] splitstore sortless compaction splitstore sortless compaction Feb 2, 2022
@vyzo vyzo added this to the █Blockstore Improvements milestone Feb 4, 2022
…t-markset-badger

splitstore: set badger as the default default markset type
Adds note about 3k IOPs requirement with badger markset, updates the memory requirement for
map to 48G based on observed behaviour of test nodes.
@jennijuju jennijuju added the P1 P1: Must be resolved label Feb 8, 2022
Copy link
Contributor

@magik6k magik6k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks simpler/easier to understand than the previous thing.

Just one tiny nit.

blockstore/splitstore/markset_badger.go Outdated Show resolved Hide resolved
@magik6k
Copy link
Contributor

magik6k commented Feb 9, 2022

@magik6k magik6k merged commit 44fd0e3 into master Feb 9, 2022
@magik6k magik6k deleted the feat/splitstore-sortless-compaction branch February 9, 2022 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 P1: Must be resolved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Splitstore: Rework the Compaction algorithm to eliminate sorting
3 participants