TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Badger vs. RocksDB

93 pointsby alixaxelover 6 years ago

2 comments

cdoxseyover 6 years ago
&gt; Badger provides better performance than RocksDB, both in terms of reads and writes.<p>It&#x27;s not that simple. It&#x27;s never that simple.<p>These are incredibly complex pieces of software designed as generic solutions to a thousand different problems on dozens of platforms. For some combinations of platform+problem these KV stores will do great. But it would be terribly naive to assume it will work in every situation. I can guarantee there are workloads that RocksDB will do better with.<p>When badger was first released I was pretty skeptical of it... it seemed to be quite buggy, and I tinkered with swapping out our metrics database MDBM-based implementation (yeah that ancient yahoo KV store no one talks about), but it didn&#x27;t turn out to be a good fit for the use case. It wasn&#x27;t even in the same ballpark performance-wise. But I hoped that maybe in a few years it would mature.<p>This puff piece isn&#x27;t changing my opinion of it...<p>The RocksDB folks seem to be a lot more honest about the realities of tuning KV stores: <a href="https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;rocksdb&#x2F;wiki&#x2F;RocksDB-Tuning-Guide" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;facebook&#x2F;rocksdb&#x2F;wiki&#x2F;RocksDB-Tuning-Guid...</a><p>&gt; Unfortunately, configuring RocksDB optimally is not trivial. Even we as RocksDB developers don&#x27;t fully understand the effect of each configuration change. If you want to fully optimize RocksDB for your workload, we recommend experiments and benchmarking, while keeping an eye on the three amplification factors. Also, please don&#x27;t hesitate to ask us for help on the RocksDB Developer&#x27;s Discussion Group.
评论 #19005088 未加载
karmakazeover 6 years ago
The two points I wanted to know about their differences:<p>&gt; Badger is different from other LSM tree based DBs in that it colocates only small values or pointers along with these keys, storing the values separately in a value log.<p>&gt; we decided to cut out RocksDB and Cgo entirely from our code base and write a fast key-value database purely in Go