Limit rocksdb cache usage

95 views
Skip to first unread message

Apurva Agarwal

unread,
Sep 8, 2022, 1:34:48 AM9/8/22
to rocksdb
Hi Team,

How can we limit the usage of cache for rocksdb?

Thanks for your help!

Mark Rambacher

unread,
Sep 8, 2022, 6:52:18 AM9/8/22
to Apurva Agarwal, rocksdb
Can you better describe what you mean by "limit the usage of the cache"? What problem are you trying to solve?  More context would be most helpful.

/ Mark
 

--
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/c645ba06-844d-41e4-93e2-3e147c31fa5fn%40googlegroups.com.

Apurva Agarwal

unread,
Sep 8, 2022, 10:25:06 AM9/8/22
to rocksdb
Hi Mark,

Thanks for the reply.

To elaborate on my query:
Our application runs on embedded device where we have some constrains on amount of resident memory which our app can use but currently we see that rocksdb uses around 300mb of resident memory. Hence we want to cap it to some lower number.

Mark Rambacher

unread,
Sep 8, 2022, 11:01:02 AM9/8/22
to Apurva Agarwal, rocksdb
I am not an expert on memory consumption, but you might want to start with Options::OptimizeForSmallDb() and see how those options change your performance.  Depending on how you are using RocksDB and your read/write ratio, you may also want to look at the options set by OptimizeForPointLookup().

/ Mark

Dan Carfas

unread,
Oct 22, 2022, 3:01:03 PM10/22/22
to rocksdb
Here is the buzz from the Speedb hive in regards to your question:


If you have follow up questions or want more info and help, join our hive on Discord and Discourse 

Reply all
Reply to author
Forward
0 new messages