facebook / facebook/rocksdb

WriteBatchWithIndex seems slow

Open
#608 14 comments 0 reactions 0 assignees View on GitHub
abandoned-or-aged-out java-api question
Dominant language
C++
Stars
32.1k
Forks
6.9k
Avg merge
32m
Merged PRs (30d)
1

Description

I am trying to atomically write 5,305,512 key/value pairs into RocksDB. The performance of this feels slow to me, at about 60 seconds.

I am writing to a single WriteBatchWithIndex through calling `org.rocksdb.WriteBatchWithIndex#put(byte[], int, byte[], int, long)`, this takes some ~50 seconds. Whereas subsequently writing that batch into Rocks using `org.rocksdb.RocksDB#write(org.rocksdb.WriteOptions, org.rocksdb.WriteBatchWithIndex)` takes just ~8 seconds.

Is WriteBatchWithIndex known to be slow? I was under the impression that it was all in-memory in a skip-list and so would be quite quick.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.