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

Limit number of goroutines in FastCommit() #268

Merged
merged 1 commit into from
Jun 3, 2022
Merged

Conversation

SaveTheRbtz
Copy link
Contributor

@SaveTheRbtz SaveTheRbtz commented Jun 3, 2022

Partially improves: #267

Description

Currently, PersistentSlabStorage.FastCommit() creates goroutines during runtime.

This may be a bit inefficient in cases where there is a small number of keys and a high number of CPUs. For now, simply upper-bound the number of goroutines by the number keys.


  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@codecov-commenter
Copy link

Codecov Report

Merging #268 (f439666) into main (525fbc2) will decrease coverage by 0.02%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #268      +/-   ##
==========================================
- Coverage   68.98%   68.95%   -0.03%     
==========================================
  Files          14       14              
  Lines        7257     7260       +3     
==========================================
  Hits         5006     5006              
- Misses       1619     1621       +2     
- Partials      632      633       +1     
Impacted Files Coverage Δ
storage.go 79.13% <0.00%> (-0.42%) ⬇️

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 525fbc2...f439666. Read the comment docs.

Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Member

@fxamacker fxamacker left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks!

@fxamacker fxamacker merged commit 9de15f4 into main Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants