pub struct DiskConfig {Show 14 fields
pub io_threads: usize,
pub storage_mode: StorageMode,
pub cache_size: usize,
pub write_cache_ratio: f32,
pub channel_capacity: usize,
pub buffer_pool_capacity: usize,
pub enable_mlock: bool,
pub lock_warn_threshold_ms: u64,
pub io_uring_sq_depth: u32,
pub io_uring_direct_io: bool,
pub filesystem_direct_io: bool,
pub io_uring_batch_threshold: usize,
pub iocp_concurrent_threads: u32,
pub iocp_direct_io: bool,
}Expand description
Configuration for the disk I/O subsystem.
Fields§
§io_threads: usizeNumber of concurrent I/O threads (semaphore permits). Default: 4.
storage_mode: StorageModeStorage allocation mode. Default: Auto.
cache_size: usizeTotal cache size in bytes (read + write). Default: 16 MiB.
Deprecated: use buffer_pool_capacity instead.
write_cache_ratio: f32Fraction of cache_size reserved for write buffering. Default: 0.5.
Deprecated: buffer pool handles write/read split implicitly.
channel_capacity: usizeBounded channel capacity. Default: 512.
buffer_pool_capacity: usizeUnified buffer pool capacity in bytes. Default: 64 MiB.
enable_mlock: boolLock cached piece data in physical memory. Default: true on Unix.
lock_warn_threshold_ms: u64M120: Lock timing warning threshold in milliseconds (0 = disabled).
io_uring_sq_depth: u32io_uring submission queue depth. Default: 256.
io_uring_direct_io: boolEnable O_DIRECT for io_uring writes. Default: false.
filesystem_direct_io: boolEnable direct I/O for filesystem storage (O_DIRECT / F_NOCACHE). Default: false.
io_uring_batch_threshold: usizeMinimum segments to batch for io_uring. Default: 4.
iocp_concurrent_threads: u32IOCP concurrent thread count (0 = system default). Default: 0.
iocp_direct_io: boolEnable FILE_FLAG_NO_BUFFERING for IOCP I/O. Default: false.
Trait Implementations§
Source§impl Clone for DiskConfig
impl Clone for DiskConfig
Source§fn clone(&self) -> DiskConfig
fn clone(&self) -> DiskConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more