Skip to main content

COMPACTION_READAHEAD_BYTES

Constant COMPACTION_READAHEAD_BYTES 

Source
pub const COMPACTION_READAHEAD_BYTES: usize = _; // 2_097_152usize
Expand description

Compaction readahead (bytes).

rocksdb_options_compaction_readahead_size: compaction reads its input SSTs sequentially; 2 MiB matches the RocksDB ≥ 8.7 default (older releases defaulted to 0, which post-8.6 means almost no readahead). Keep this at or below the device’s max_sectors_kb — reads larger than that are split by the block layer, which measurably hurt application throughput in smalldatum’s 8.6+ benchmarks (github.com/facebook/rocksdb/issues/12038). The benchmark box’s spinners report max_sectors_kb 4096, so 2 MiB reads go out unsplit.