pub struct IoSchedulerConfig {Show 19 fields
pub max_concurrent_reads: usize,
pub high_priority_size_threshold: usize,
pub low_priority_size_threshold: usize,
pub queue_high_capacity: usize,
pub queue_normal_capacity: usize,
pub queue_low_capacity: usize,
pub starvation_prevention_interval_ms: u64,
pub starvation_threshold_secs: u64,
pub load_sample_window: usize,
pub load_high_threshold_ms: u64,
pub load_low_threshold_ms: u64,
pub enable_priority: bool,
pub storage_detection_enabled: bool,
pub sequential_detection_enabled: bool,
pub bandwidth_monitoring_enabled: bool,
pub adaptive_buffer_enabled: bool,
pub base_buffer_size: usize,
pub max_buffer_size: usize,
pub min_buffer_size: usize,
}Expand description
I/O scheduler configuration.
Fields§
§max_concurrent_reads: usizeMaximum concurrent disk reads.
high_priority_size_threshold: usizeHigh priority size threshold in bytes.
low_priority_size_threshold: usizeLow priority size threshold in bytes.
queue_high_capacity: usizeHigh priority queue capacity.
queue_normal_capacity: usizeNormal priority queue capacity.
queue_low_capacity: usizeLow priority queue capacity.
starvation_prevention_interval_ms: u64Starvation prevention check interval in milliseconds.
starvation_threshold_secs: u64Starvation threshold in seconds.
load_sample_window: usizeLoad sampling window size.
load_high_threshold_ms: u64High load wait time threshold in milliseconds.
load_low_threshold_ms: u64Low load wait time threshold in milliseconds.
enable_priority: boolWhether priority scheduling is enabled.
storage_detection_enabled: boolStorage media detection enabled.
sequential_detection_enabled: boolSequential detection enabled.
bandwidth_monitoring_enabled: boolBandwidth monitoring enabled.
adaptive_buffer_enabled: boolAdaptive buffer sizing enabled.
base_buffer_size: usizeBase buffer size for I/O operations.
max_buffer_size: usizeMaximum buffer size.
min_buffer_size: usizeMinimum buffer size.
Implementations§
Source§impl IoSchedulerConfig
impl IoSchedulerConfig
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Sourcepub fn starvation_prevention_interval(&self) -> Duration
pub fn starvation_prevention_interval(&self) -> Duration
Get the starvation prevention interval as a Duration.
Sourcepub fn starvation_threshold(&self) -> Duration
pub fn starvation_threshold(&self) -> Duration
Get the starvation threshold as a Duration.
Sourcepub fn load_high_threshold(&self) -> Duration
pub fn load_high_threshold(&self) -> Duration
Get the high load threshold as a Duration.
Sourcepub fn load_low_threshold(&self) -> Duration
pub fn load_low_threshold(&self) -> Duration
Get the low load threshold as a Duration.
Sourcepub fn with_max_concurrent_reads(self, value: usize) -> Self
pub fn with_max_concurrent_reads(self, value: usize) -> Self
Builder pattern: set max concurrent reads.
Sourcepub fn with_priority_thresholds(self, high: usize, low: usize) -> Self
pub fn with_priority_thresholds(self, high: usize, low: usize) -> Self
Builder pattern: set priority thresholds.
Sourcepub fn with_buffer_sizes(self, base: usize, min: usize, max: usize) -> Self
pub fn with_buffer_sizes(self, base: usize, min: usize, max: usize) -> Self
Builder pattern: set buffer sizes.
Sourcepub fn with_priority_enabled(self, enabled: bool) -> Self
pub fn with_priority_enabled(self, enabled: bool) -> Self
Builder pattern: enable/disable priority scheduling.