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

Use less memtables for the entire db, reserved for switch memtable #779

Open
ofriedma opened this issue Nov 26, 2023 · 3 comments
Open

Use less memtables for the entire db, reserved for switch memtable #779

ofriedma opened this issue Nov 26, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request Future A feature request that we are interested in working on but haven't started yet

Comments

@ofriedma
Copy link
Contributor

Currently for each CF, we reserve a spare memtable waiting to replace the active one, we could reserve it for the entire db so we will be able to save some memory

@ofriedma ofriedma added enhancement New feature or request Future A feature request that we are interested in working on but haven't started yet labels Nov 26, 2023
@udi-speedb
Copy link
Contributor

@ofriedma -

  1. I assume this issue is applicable to Speedb's memtables only. Am I right?
  2. How much memory does a single empty memtable consume?

@ofriedma
Copy link
Contributor Author

ofriedma commented Nov 27, 2023

  1. No, for all implementations
  2. Didn't investigate it has it's still under future to research - it depends on the memtable itself

@ayulas
Copy link
Contributor

ayulas commented Nov 29, 2023

its completely not correct. this was the propose of doing the global switch #296
the prepare switch memtable is done on a memtable factory, and only on a factory that support that - e.g. enable_switch_memtable_ is true. so it means that if all the cfs use the same factory ,this is on entire db....
currently only hash spdb memtable uses it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Future A feature request that we are interested in working on but haven't started yet
Projects
Status: No status
Development

No branches or pull requests

5 participants