pub struct GroupCommitSettings {
pub min_batch_size: usize,
pub max_batch_size: usize,
pub max_wait_us: u64,
pub fsync_latency_us: u64,
}Expand description
Group commit settings - mirrors SQLite’s WAL mode tuning
§Performance Model
Without group commit: Throughput = 1 / L_fsync ≈ 200 commits/sec (L=5ms) With group commit (batch size K): Throughput = K / L_fsync = K × 200 commits/sec
For K=100: 20,000 commits/sec (100× speedup)
§SQLite Comparison
| Setting | SQLite Equivalent |
|---|---|
| batch_size = 1 | PRAGMA synchronous = FULL |
| batch_size = 100 | WAL mode with batching |
| max_wait_us = 0 | No delay, immediate flush |
| max_wait_us = 10000 | Up to 10ms delay for batch |
Fields§
§min_batch_size: usizeMinimum batch size before flush (default: 1)
max_batch_size: usizeMaximum batch size (default: 1000)
max_wait_us: u64Maximum wait time before flush in microseconds (default: 10000 = 10ms)
fsync_latency_us: u64Expected fsync latency in microseconds (for adaptive sizing)
Implementations§
Source§impl GroupCommitSettings
impl GroupCommitSettings
Sourcepub fn high_throughput() -> Self
pub fn high_throughput() -> Self
High throughput preset - maximizes batching
Sourcepub fn low_latency() -> Self
pub fn low_latency() -> Self
Low latency preset - minimal batching
Trait Implementations§
Source§impl Clone for GroupCommitSettings
impl Clone for GroupCommitSettings
Source§fn clone(&self) -> GroupCommitSettings
fn clone(&self) -> GroupCommitSettings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for GroupCommitSettings
impl Debug for GroupCommitSettings
Auto Trait Implementations§
impl Freeze for GroupCommitSettings
impl RefUnwindSafe for GroupCommitSettings
impl Send for GroupCommitSettings
impl Sync for GroupCommitSettings
impl Unpin for GroupCommitSettings
impl UnsafeUnpin for GroupCommitSettings
impl UnwindSafe for GroupCommitSettings
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more