Skip to main content

Module profile

Module profile 

Source
Expand description

Adaptive I/O strategys: named writer configurations plus the shared, atomically-swappable runtime values that let the controller retune the write pipeline mid-run without stopping writer threads.

Design: docs/features/ADAPTIVE_IO_PROFILES.md. One configuration cannot serve NVMe (wants parallel writers, small buffers), spinning disks (wants one writer, huge sequential writes), and cheap flash / network mounts (wants the fewest write operations). The three named profiles capture those device classes; --io-strategy auto opens with a probe-chosen profile and lets the feedback controller own the truth afterwards.

Structs§

ProfileValues
The runtime-swappable subset of a WriterProfile, shared between the producer, the writer threads, and the controller.
WriterProfile
A concrete writer configuration: everything that used to be hard-coded consts (STAGE_FLUSH, STAGE_TOTAL_CAP) or env-only knobs, as one value.

Enums§

IoStrategy
The --io-strategy CLI choice: a pinned named profile, or auto (probe + feedback controller).
ProfileKind
The three device-class states of the adaptive controller.

Functions§

env_writer_count
The SQL_SPLITTER_WRITERS env override, if set to a valid count. When present it pins the writer count in every mode, which also disables the controller’s deferred writer growth.
probe_output_dir
Probe the output directory to choose auto’s opening profile: write and fsync 8 MB, classify by the sustained rate. This is a hint only — the feedback controller owns the truth once the pipeline is running. Costs ~100 ms on NVMe; on slow media the cost is itself the signal.