pub struct DiskConfig {
pub io_threads: usize,
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 filesystem_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.
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).
filesystem_direct_io: boolEnable direct I/O for filesystem storage (O_DIRECT / F_NOCACHE). Default: false.
Trait Implementations§
Source§impl Clone for DiskConfig
impl Clone for DiskConfig
Source§fn clone(&self) -> DiskConfig
fn clone(&self) -> DiskConfig
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 DiskConfig
impl Debug for DiskConfig
Source§impl Default for DiskConfig
impl Default for DiskConfig
Source§fn default() -> DiskConfig
fn default() -> DiskConfig
Returns the “default value” for a type. Read more
Source§impl From<&Settings> for DiskConfig
impl From<&Settings> for DiskConfig
Source§fn from(s: &Settings) -> DiskConfig
fn from(s: &Settings) -> DiskConfig
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for DiskConfig
impl RefUnwindSafe for DiskConfig
impl Send for DiskConfig
impl Sync for DiskConfig
impl Unpin for DiskConfig
impl UnsafeUnpin for DiskConfig
impl UnwindSafe for DiskConfig
Blanket Implementations§
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