utsaslab / pebblesdb

The PebblesDB write-optimized key-value store (SOSP 17)
BSD 3-Clause "New" or "Revised" License
506 stars 99 forks source link

Set max memory used by PebblesDB #16

Open vijay03 opened 5 years ago

vijay03 commented 5 years ago

Right now, PebblesDB uses a lot of memory for the TableCache (caching metadata) and for the bloom filters used for each sstable.

We want to add a command line option for PebblesDB which would limit the total amount of memory used by PebblesDB for the TableCache and bloom filters.

When using the specified amount of memory, preference should be given first to the table cache, and then bloom filters for upper levels (level 0, level 1).

nguyendv commented 5 years ago

Hi @vijay03 ,

As far as I understand, Pebbles is used as a embedded library in other programs. Configurations are passed by using Options object. Therefor I'm not sure what's the command line option for? Do you mean a configuration passed to the Options object, or a CLI option when compiling Pebbles, or something else?

vijay03 commented 5 years ago

Ah, thanks for the catch! I meant as a configuration passed to Options. An option to set a default when compiling PebblesDB would be awesome too!