Class WalWriterOptions
Configuration options for the WAL Writer thread.
public sealed class WalWriterOptions
- Inheritance
-
WalWriterOptions
- Inherited Members
Constructors
WalWriterOptions()
public WalWriterOptions()
Properties
GroupCommitIntervalMs
GroupCommit flush interval in milliseconds. The WAL writer auto-flushes at this interval when using GroupCommit. Default: 5ms.
public int GroupCommitIntervalMs { get; set; }
Property Value
InitialSegmentSize
Size of the FIRST segment created when the WAL opens, in bytes. Default: 16 MB. Clamped to SegmentSize when larger; 0 means "use SegmentSize", restoring the pre-#784 behaviour.
public uint InitialSegmentSize { get; set; }
Property Value
Remarks
A database that never fills a segment never rotates, so this one file IS its entire WAL for the lifetime of the
bundle. Sizing it for steady-state throughput therefore charged every small database the full
SegmentSize on disk forever — a 1.8 MB database carried a 320 MiB wal/ directory. Segments
created by rotation are unaffected: from the first rotation on, everything is SegmentSize as before,
so a busy database's steady state is unchanged.
PreAllocateSegments
Number of segments to pre-allocate ahead of the write position. Default: 4.
public int PreAllocateSegments { get; set; }
Property Value
Remarks
The pool is built on the FIRST ROTATION, not at open — until a database has actually filled a segment there is no
evidence it ever will, and pre-allocating eagerly left PreAllocateSegments * SegmentSize of empty, headerless
files that WAL reclamation cannot see (they are never sealed, so they never enter the reclaim list). See #784.
SegmentSize
Size of each WAL segment file in bytes. Default: 64 MB.
public uint SegmentSize { get; set; }
Property Value
StagingBufferSize
Size of the 4096-byte-aligned staging buffer used for O_DIRECT writes. Default: 256 KB. Must be a multiple of 4096.
public int StagingBufferSize { get; set; }
Property Value
UseFUA
Whether to open segment files with FUA (Force Unit Access) for per-write durability. When true, each write is durable on return. When false, explicit flush calls are needed. Default: true (safe default for Immediate mode support).
public bool UseFUA { get; set; }
Property Value
WalDirectory
Directory where WAL segment files are stored. Leave null (the default) to let the engine derive {bundle}/wal inside the
database's .typhon bundle — this keeps each database's WAL private and drops the old cwd-relative shared wal/. Set explicitly only to
place the WAL elsewhere.
public string WalDirectory { get; set; }
Property Value
WriterThreadCoreAffinity
Core affinity for the WAL writer thread. -1 for no affinity (default). When set, pins the writer thread to the specified logical core.
public int WriterThreadCoreAffinity { get; set; }