does rocksdb use mmap?

280 views
Skip to first unread message

Siddharth Jain

unread,
Oct 7, 2023, 6:34:12 PM10/7/23
to roc...@googlegroups.com
as the title says i am curious if rocksdb uses mmap and if anyone can tell me advantages vs. disadvantages of mmap?

the motivation behind the question is this post i came across:

>LevelDB uses mmap and then once Facebook forked it to build Rocksdb the first thing they did was to get rid of mmap.

but I also read this:
which seems to suggest rocksdb uses mmap

Dan Carfas

unread,
Oct 8, 2023, 6:37:49 AM10/8/23
to Siddharth Jain, roc...@googlegroups.com
From the Speedb Hive:

you can ask specifically for mmap using the relevant options. The issue is that if you have a large database you will eventually run OOM, the other issue of reading too much was fixed in rocksdb. As for the cache0 vs cache1. In a week we will have a version that includes "static pinning" which includes a pinning of indexes and filter with a safety belt and perform as good as cache1  if you have enough memory but will also have a safety belt to eliminate the OOM worries,.

You can find the Speedb hive here and (once you've registered) the link to the thread with your question here, if you have more questions or need additional info


--
You received this message because you are subscribed to the Google Groups "rocksdb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rocksdb+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rocksdb/CAPqV3pQQ9VJDo0d2YZtkwwJm%2BCLNBG3Qyq_3AtEkaTq0vzZ6qg%40mail.gmail.com.

雷鹏

unread,
Dec 30, 2023, 2:13:57 AM12/30/23
to rocksdb
rocksdb have PlainTable which use mmap, but PlainTable is not full fledged. While ToplingDB(forked from RocksDB) use mmap by realizing serveral TableFactory(s) and other enhancements, gains average 3x ~ 20x performance improvemens.
Reply all
Reply to author
Forward
0 new messages