Skip to main content

IoSchedulerConfig

Struct IoSchedulerConfig 

Source
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: usize

Maximum concurrent disk reads.

§high_priority_size_threshold: usize

High priority size threshold in bytes.

§low_priority_size_threshold: usize

Low priority size threshold in bytes.

§queue_high_capacity: usize

High priority queue capacity.

§queue_normal_capacity: usize

Normal priority queue capacity.

§queue_low_capacity: usize

Low priority queue capacity.

§starvation_prevention_interval_ms: u64

Starvation prevention check interval in milliseconds.

§starvation_threshold_secs: u64

Starvation threshold in seconds.

§load_sample_window: usize

Load sampling window size.

§load_high_threshold_ms: u64

High load wait time threshold in milliseconds.

§load_low_threshold_ms: u64

Low load wait time threshold in milliseconds.

§enable_priority: bool

Whether priority scheduling is enabled.

§storage_detection_enabled: bool

Storage media detection enabled.

§sequential_detection_enabled: bool

Sequential detection enabled.

§bandwidth_monitoring_enabled: bool

Bandwidth monitoring enabled.

§adaptive_buffer_enabled: bool

Adaptive buffer sizing enabled.

§base_buffer_size: usize

Base buffer size for I/O operations.

§max_buffer_size: usize

Maximum buffer size.

§min_buffer_size: usize

Minimum buffer size.

Implementations§

Source§

impl IoSchedulerConfig

Source

pub fn new() -> Self

Create a new configuration with default values.

Source

pub fn validate(&self) -> Result<(), ConfigError>

Validate the configuration.

§Errors

Returns an error if any configuration value is invalid.

Source

pub fn starvation_prevention_interval(&self) -> Duration

Get the starvation prevention interval as a Duration.

Source

pub fn starvation_threshold(&self) -> Duration

Get the starvation threshold as a Duration.

Source

pub fn load_high_threshold(&self) -> Duration

Get the high load threshold as a Duration.

Source

pub fn load_low_threshold(&self) -> Duration

Get the low load threshold as a Duration.

Source

pub fn with_max_concurrent_reads(self, value: usize) -> Self

Builder pattern: set max concurrent reads.

Source

pub fn with_priority_thresholds(self, high: usize, low: usize) -> Self

Builder pattern: set priority thresholds.

Source

pub fn with_buffer_sizes(self, base: usize, min: usize, max: usize) -> Self

Builder pattern: set buffer sizes.

Source

pub fn with_priority_enabled(self, enabled: bool) -> Self

Builder pattern: enable/disable priority scheduling.

Trait Implementations§

Source§

impl Clone for IoSchedulerConfig

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for IoSchedulerConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for IoSchedulerConfig

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for IoSchedulerConfig

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for IoSchedulerConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more