speedb icon indicating copy to clipboard operation
speedb copied to clipboard

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

Open ofriedma opened this issue 2 years ago • 3 comments

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 avatar Nov 26 '23 14:11 ofriedma

@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?

udi-speedb avatar Nov 26 '23 16:11 udi-speedb

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

ofriedma avatar Nov 27 '23 12:11 ofriedma

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

ayulas avatar Nov 29 '23 21:11 ayulas