-
Notifications
You must be signed in to change notification settings - Fork 137
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
memdb: use btree for storage #53
Conversation
Benchmarks, doing range scans of 10.000 keys on databases with 1 million and 10 million keys:
For these database sizes, B-trees have a speedup of 2-3 orders of magnitude. More importantly, and as expected, the old map-based database has a dependence on the number of keys in the database while B-trees do not. The tradeoff is that read/write operations are three times more costly, but I think that's well worth it. |
I ran some Cosmos SDK benchmarks using the B-tree MemDB, via
It appears that IAVLs use of MemDB in Overall memory usage is about the same in both cases. |
* Create SECURITY.md * Update SECURITY.md * Apply suggestions from code review --------- Co-authored-by: Thane Thomson <[email protected]>
Fixes #52 (see also tendermint/tendermint#4520). Uses a B-tree for storage, which should significantly improve range scan performance. No breaking changes.
Haven't had time to benchmark this yet, will do so shortly.