3 ms·
1. They start off with why they don't want to use Cgo. Not a go expert, so I don't have an opinion on whether that makes sense or not. If the goal is to not us
by tyingq 8y ago
1. They start off with why they don't want to use Cgo. Not a go expert, so I don't have an opinion on whether that makes sense or not. If the goal is to not use Cgo, they can't use RocksDB.
2. It appears to be 12 bytes. ID, length, offset, all as 4 byte uint32 values: https://github.com/dgraph-io/badger/blob/5242a997f5101ee00c433d5fc96432ec8f111ef5/structs.go#L12 https://github.com/dgraph-io/badger/blob/5242a997f5101ee00c4...
- mutatio 8y ago2. I still believe the 16 bytes stands on x64 (8 byte aligned, thus 4 bytes padding).
- majidazimi 8y agoThen any other database written in pure Go would be sufficient to keep the index.
- tyingq 8y agoSure. Searching a bit, they did benchmark against BoltDB, but didn't try what you're suggesting. The benchmark I found is also prior to them adding transactions to Badger. Edit: Actually, the benchmarks turn off sync writes, which makes them silly to me. If you're okay with losing data, you probably wouldn't have chosen a disk based kv store. https://github.com/dgraph-io/badger-bench/blob/master/rw-bench/bench.go#L76 https://github.com/dgraph-io/badger-bench/blob/master/rw-ben... The default install has sync writes turned on, so why benchmark it differently?
- mrjn 8y agoAs mentioned in my top comment, we have run benchmarks again. SyncWrites on or off, Badger outperforms BoltDB. There's a nice ASCIIrema link that you can see, which is a recording of me running Ethereum 2.0 store benchmarks.