Discussion:
[leveldb] mmap & block_cache
Lucas Lersch
2016-08-29 07:15:04 UTC
Permalink
leveldb mmaps up to 1000 files according to the posix environment. If each
file is 2MB, that means that leveldb consumes up to 2GB of memory with
mmap. Why the choice for mmap? Why not spending this 2GB in the block_cache?
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Lucas Lersch
2016-10-17 22:05:55 UTC
Permalink
So just to share the answer to my question. The block_cache is caching
uncompressed data, while mmap is memory mapping compressed data (SSTable).
Based on these information one can have a policy to decide where it is
better to spend memory.

Additionally I have another question. What is the use of the TableCache?
Post by Lucas Lersch
leveldb mmaps up to 1000 files according to the posix environment. If each
file is 2MB, that means that leveldb consumes up to 2GB of memory with
mmap. Why the choice for mmap? Why not spending this 2GB in the block_cache?
--
You received this message because you are subscribed to the Google Groups "leveldb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leveldb+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...