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

feat(storage): separate storage databases experimentally #410

Merged
merged 1 commit into from
Apr 14, 2023
Merged

Conversation

ijsong
Copy link
Member

@ijsong ijsong commented Apr 11, 2023

What this PR does

This PR implemented the idea of separating the storage database, which was proposed by @hungryjang.
It divides storage databases into two parts: data database and commit database. The data part
stores records whose keys are LLSNs and whose values are log data users append. The commit part
stores records whose keys are GLSNs and whose values are LLSNs.

This approach is very performant compared to the previous one. Especially the data part can take
advantage of move compaction dramatically. Empirically throughput can be increased by about 10-20%
and append duration reduced by about 10-20%.
However, it doubles the number of pebble instances. We should configure the storage databases
carefully to overcome this.

@codecov-commenter
Copy link

codecov-commenter commented Apr 11, 2023

Codecov Report

Patch coverage: 50.72% and project coverage change: +0.16 🎉

Comparison is base (6ccf9ec) 63.60% compared to head (e3fa2f4) 63.76%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files
@@               Coverage Diff                @@
##           test_options     #410      +/-   ##
================================================
+ Coverage         63.60%   63.76%   +0.16%     
================================================
  Files               131      131              
  Lines             17801    17918     +117     
================================================
+ Hits              11322    11426     +104     
- Misses             5937     5949      +12     
- Partials            542      543       +1     
Impacted Files Coverage Δ
internal/storage/testing.go 18.60% <0.00%> (-0.91%) ⬇️
internal/storage/config.go 51.33% <18.66%> (-12.96%) ⬇️
internal/storage/append_batch.go 76.92% <61.53%> (-5.43%) ⬇️
internal/storage/storage.go 87.45% <74.74%> (+9.52%) ⬆️
internal/storage/recovery_points.go 90.69% <100.00%> (ø)
internal/storage/scanner.go 98.71% <100.00%> (ø)
internal/storagenode/storagenode.go 73.78% <100.00%> (+0.84%) ⬆️
internal/storagenode/volume/volume.go 94.38% <100.00%> (ø)

... and 7 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

This PR implemented the idea of separating the storage database, which was proposed by @hungryjang.
It divides storage databases into two parts: data database and commit database. The data part
stores records whose keys are LLSNs and whose values are log data users append. The commit part
stores records whose keys are GLSNs and whose values are LLSNs.

This approach is very performant compared to the previous one. Especially the data part can take
advantage of move compaction dramatically. Empirically throughput can be increased by about 10-20%
and append duration reduced by about 10-20%.
However, it doubles the number of pebble instances. We should configure the storage databases
carefully to overcome this.
@ijsong ijsong merged commit 9f64785 into main Apr 14, 2023
@ijsong ijsong deleted the separate_db branch April 14, 2023 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants