RocksDB-Sharp

Configuration

RocksDB exposes hundreds of knobs. The C# binding groups them into a handful of fluent option types:

Type Scope When you set it
DbOptions Database-wide Passed to RocksDb.Open(...).
ColumnFamilyOptions Per column family Passed inside ColumnFamilies at open time, or used by CreateColumnFamily.
ReadOptions Per read / iterator Passed to Get, MultiGet, NewIterator.
WriteOptions Per write Passed to Put, Merge, Remove, Write.
BlockBasedTableOptions Per column family's table format Attached to a ColumnFamilyOptions.

All of them are fluent builders — every setter returns this — so you can chain:

var options = new DbOptions()
    .SetCreateIfMissing(true)
    .IncreaseParallelism(Environment.ProcessorCount)
    .SetMaxOpenFiles(-1)
    .SetCompression(Compression.Zstd);

For the upstream reference on what each option does, see the Tuning Guide, Setup Options and Basic Tuning, and the headers in include/rocksdb/options.h.

DbOptions

Database-wide knobs — parallelism, WAL, max open files, info logging, statistics.

ColumnFamilyOptions

Per-CF knobs — compression, memtable size, compaction style, merge operator, comparator.

Read & Write Options

Per-call options — fill_cache, sync, iterate bounds, snapshots, disable WAL.

Block-based Tables

Block size, block cache, Bloom filter policy, index type — the SST-file format.

© 2026 RocksDB-Sharp. All rights reserved.