Re:Pebble: A RocksDB Inspired Key-Value Store Written in Go
by ryanworl on Tuesday September 15, 2020 @07:05PM
(#24487743)
Have you considered using direct IO for the log?
Re:Pebble: A RocksDB Inspired Key-Value Store Written in Go
by petermattis on Tuesday September 15, 2020 @07:25PM
(#24487879)
Yes. So far performance was worse in experiments, and the durability improvements are questionable because it is extremely difficult to get a clear understanding of the durability semantics of direct IO. If you can find a pointer to clear documentation of what those semantics are I'd be extremely interested in reading it.
Re:Pebble: A RocksDB Inspired Key-Value Store Written in Go
by dis-sys on Tuesday September 15, 2020 @11:42PM
(#24489339)
RocksDB supports using Direct IO for flush and compaction (use_direct_io_for_flush_and_compaction), enabling that can improve write throughput for my workload in RocksDB. Any plan to do that in pebble?
Re:Pebble: A RocksDB Inspired Key-Value Store Written in Go
by petermattis on Wednesday September 16, 2020 @08:05AM
(#24491779)
Direct IO is on our radar, though when I experimented with enabling direct IO in RocksDB it only hurt CockroachDB benchmarks. This was several years ago. I believe newer releases of RocksDB have made improvements in this area.
From the Rebello paper: > However, on restart, since the log entry is in the page cache, LevelDB includes it while creating an SSTable from the log file.
Pebble and RocksDB both inherited this behavior. The nuance here is that the sstable is then synced to disk and no reads are served until the sync is successful. If the machine were to crash before the sstable was synced, upon restart we'd rollback to the durable prefix of the log.