Developing RocksDB multi-store server

351 views
Skip to first unread message

Jan Lisowiec

unread,
Jul 11, 2017, 2:41:20 AM7/11/17
to rocksdb
Hi

I've developed a RocksDB server with a layer that aggregates multiple instances of RocksDB databases within a single address space. For the client front-end I've developed a unified API that can talk to each instance via a dedicated high-performance protocol. Since the server creates and manages multiple instances of RocksDB, potentially a large number, I need a way to manage file descriptors and memory across all these instances. RocksDB allows putting limits on these resources per individual database. The question is, has anyone developed a way to control these resources across multiple instances running within the same address space?

Best
Jan Lisowiec

Adam Retter

unread,
Jul 11, 2017, 8:59:41 AM7/11/17
to Jan Lisowiec, rocksdb
Have you looked at the Env class which can be used across multiple RocksDB?
> --
> 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 post to this group, send email to roc...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/rocksdb/bcae67ca-8261-49d5-a4c1-a22e43b130ae%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



--
Adam Retter

skype: adam.retter
tweet: adamretter
http://www.adamretter.org.uk

Igor Canadi

unread,
Jul 11, 2017, 11:15:36 AM7/11/17
to Adam Retter, Jan Lisowiec, rocksdb
Hi Jan,

Unfortunately I don't think you can set one file descriptor limit for multiple databases - it will need to be per-database. However, as Adam says, the databases should share both the Env object and block_cache, which will share the thread pool and the userspace cache. This is how many services at Facebook run RocksDB -- multiple databases in a single process.

Igor

Jan Lisowiec

unread,
Jul 13, 2017, 5:04:10 AM7/13/17
to rocksdb
Hi Igor,

Thanks for the tip. 
I'm also trying to integrate it with Ceph. I can run it on top of CephFS but I guess it should be also possible to integrate it with Librado. I'd be interested in knowing if Env provides enough functionality so an adaptation to Librado can be developed?

Best
Jan

also 

Igor Canadi

unread,
Jul 13, 2017, 2:19:00 PM7/13/17
to Jan Lisowiec, rocksdb
Yes, I'm pretty sure you can integrate it with Ceph. At Facebook we integrated it with HDFS (https://github.com/facebook/rocksdb/blob/master/hdfs/env_hdfs.h) and now at Rockset we integrated with S3 (check it out: https://github.com/rockset/rocksdb-cloud). If you end up implementing Ceph Env, we would love your contribution to RocksDB cloud project.

Best,
Igor



To unsubscribe from this group and stop receiving emails from it, send an email to rocksdb+unsubscribe@googlegroups.com.

To post to this group, send email to roc...@googlegroups.com.

MARK CALLAGHAN

unread,
Jul 13, 2017, 4:18:36 PM7/13/17
to Igor Canadi, Jan Lisowiec, rocksdb

Igor Canadi

unread,
Jul 14, 2017, 12:33:49 AM7/14/17
to MARK CALLAGHAN, Jan Lisowiec, rocksdb
Oh yeah, looks like it's already there in the upstream: https://github.com/facebook/rocksdb/blob/master/utilities/env_librados.md

To unsubscribe from this group and stop receiving emails from it, send an email to rocksdb+u...@googlegroups.com.

To post to this group, send email to roc...@googlegroups.com.

--
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 post to this group, send email to roc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages