-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switching to RocksDB as the default db backend #111
Comments
Finding and considerations about this improvementAfter taking a look at the implementation that has been done inside #154, I would like to recap what I've discovered about the different database backends that are used inside a Cosmos-SDK application. 1. Different databasesThe main thing to understand is that there are different databases being used. Specifically, there are more than one used by Tendermint and only one (as far as I can tell) used by Cosmos. 2. Different database enginesSince the Tendermint and Cosmos databases are created in different points in time, they can run on different database engines. 3. Different ways of specifying the database enginesSince they can be different between Tendermint and Cosmos, there are two ways of specifying the database engine to be used. Particularly:
4. Different database backends supportDue to the fact that they are created in different ways, the backends they support is very different:
To solve this difference I've raised issue #6218 and created PR #6219 on Cosmos to support the same backends that Tendermint supports. 5. Using a database different than
|
Thanks for the research. As long as it would work and won't give any conflicts in the Cosmos SDK, I would like to make it a suggestion when the node operators deploy Desmos. It doesn't have to be a default option. Installing RocksDB seems quite straight forward. I see more and more projects (at least |
I'm implementing benchmarks tests right now, once I've finished I could try some tests on different local chains configurations. What do you think @RiccardoM @kwunyeung ? |
In my personal opinion, I think that actually there is no need to implement our custom benchmark tests for this. A part for being extremely costly, it would add pretty much no value to the currently existing tests are have already been made by other people. We could for example refer to:
Just by looking at those it appears that RocksDB is much faster than LevelDB, and that's why I would suggest validators to use, without making it the default one (due to the long time of compilation required). |
Ok good to go! |
Closes #97
The latest version of
Tendermint
added an option for usingRocksDB
as the db backend.tendermint/tendermint#4239
which is available in
SDK v0.38.x
RocksDB
was created byFacebook
as a high performance implementation ofLevelDB
.https://github.com/facebook/rocksdb/wiki
Some benchmarks in earlier years have shown that although
RocksDB
would create a large DB in size but with better performance in read/white/delete operations.https://www.influxdata.com/blog/benchmarking-leveldb-vs-rocksdb-vs-hyperleveldb-vs-lmdb-performance-for-influxdb/
With a similar use case as
Facebook
, I suggest we should try usingRocksDB
as the default db backend.Of course we have to study if there is any drawback after adapting it. How the performance gain cost resources usage, would it increase difficulties running fullnodes, etc.
The text was updated successfully, but these errors were encountered: