mirror of https://github.com/apache/cassandra
Adds an opt-in O_DIRECT write path for background SSTable producers, bypassing the OS page cache for data that is unlikely to be re-read soon after being written. Memtable flushes remain buffered. Enabled via two new YAML knobs: - background_write_disk_access_mode: standard (default) | direct - direct_write_buffer_size: 1MiB (default; aligned up to FS block size, auto-grown to fit a worst-case compressed chunk) The path is gated by config, table compression being enabled, and an OperationType allowlist in DataComponent. The allowlist is exhaustive over OperationType: any new value left unclassified fails static initialization. Operations on the DIO path: COMPACTION, MAJOR_COMPACTION, TOMBSTONE_COMPACTION, ANTICOMPACTION, GARBAGE_COLLECT, CLEANUP, UPGRADE_SSTABLES, WRITE, STREAM (chunked receiver only), RELOCATE, UNKNOWN (offline sstablesplit). Operations off the DIO path: - FLUSH (policy: just-flushed data is hot, keep in page cache) - SCRUB (correctness: tryAppend needs mark/resetAndTruncate) - Zero-Copy Streaming (bypasses DataComponent.buildWriter) - Uncompressed writers (only CompressedSequentialWriter has a DIO subclass in this change) StartupChecks fails fast if 'direct' is requested on a platform/FS that does not support O_DIRECT. patch by Sam Lightfoot; reviewed by Ariel Weisberg, Dmitry Konstantinov for CASSANDRA-21134 |
||
|---|---|---|
| .. | ||
| triggers | ||
| README.txt | ||
| cassandra-env.sh | ||
| cassandra-jaas.config | ||
| cassandra-rackdc.properties | ||
| cassandra-topology.properties.example | ||
| cassandra.yaml | ||
| cassandra_latest.yaml | ||
| commitlog_archiving.properties | ||
| cqlshrc.sample | ||
| credentials.sample | ||
| jvm-clients.options | ||
| jvm-server.options | ||
| jvm11-clients.options | ||
| jvm11-server.options | ||
| jvm17-clients.options | ||
| jvm17-server.options | ||
| jvm21-clients.options | ||
| jvm21-server.options | ||
| logback-tools.xml | ||
| logback.xml | ||
README.txt
Required configuration files ============================ cassandra.yaml: main Cassandra configuration file logback.xml: logback configuration file for Cassandra server Optional configuration files ============================ cassandra-topology.properties: used by PropertyFileSnitch