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

#14:optimize memtable switch latency #25

Merged
merged 1 commit into from
Jul 25, 2022

Conversation

Yuval-Ariel
Copy link
Contributor

With the new speedb memtable, each memtable switch needs to wait
for the allocation and initialization of ~8MiB, which creates
spikes in latency when switching memtables. Add a thread per CF
to allocate new memtables in the background so that they'll be
ready to be used when a switch happens.

Closes #14

@Yuval-Ariel Yuval-Ariel added the enhancement New feature or request label Jun 23, 2022
@Yuval-Ariel Yuval-Ariel requested a review from ayulas June 23, 2022 05:43
@ayulas ayulas force-pushed the 14-import-shorten-memtable-switch-latency branch from c1f3064 to d9915cd Compare June 28, 2022 10:51
@isaac-io isaac-io mentioned this pull request Jul 20, 2022
With the new speedb memtable, each memtable switch needs to wait
for the allocation and initialization of ~8MiB, which creates
spikes in latency when switching memtables. Add a thread per CF
to allocate new memtables in the background so that they'll be
ready to be used when a switch happens.
In case memtable is not ready when switch occor the memtable will be created
immediately

pending memtable shouldnt be calculate as used
@ayulas ayulas force-pushed the 14-import-shorten-memtable-switch-latency branch from d9915cd to 7115af7 Compare July 21, 2022 02:30
@assaf-speedb assaf-speedb merged commit bdd716f into main Jul 25, 2022
isaac-io added a commit that referenced this pull request Jul 27, 2022
The changes currently break some unit tests, so let's revert them for
now and revisit when fixes are added.
isaac-io added a commit that referenced this pull request Jul 27, 2022
The changes currently break some unit tests, so let's revert them for
now and revisit when fixes are added.
isaac-io added a commit that referenced this pull request Jul 27, 2022
The changes currently break some unit tests, so let's revert them for
now and revisit when fixes are added.
@isaac-io isaac-io deleted the 14-import-shorten-memtable-switch-latency branch August 11, 2022 07:18
@isaac-io
Copy link
Contributor

Reverted as part of #76 (in PR #77) due to breakage of unit tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import shorten memtable switch latency
4 participants