pub struct RingConfig {
pub size: u32,
pub timeout_wheel_tick: Duration,
}Expand description
Configuration of each worker’s io_uring instance and operation timing wheel.
The runtime requires Linux 6.1 or newer and always uses single-issuer mode with deferred task work. The same configuration applies to pool and dedicated workers. The wheel horizon is derived from network timeout policy.
Fields§
§size: u32SQ size and maximum outstanding operation SQEs, rounded up to a power of two.
Must be nonzero and round to at most 32,768. Defaults to 128. The runtime chooses 1024 for its production default and 128 when built for tests.
The CQ uses the kernel default of twice the rounded SQ size. Cancellation
and mailbox wake CQEs also use that space, and cancellation acknowledgements
can outlive their requests. The operation limit therefore does not bound
all pending CQEs. The runtime relies on the kernel’s CQ overflow backlog
(IORING_FEAT_NODROP), drained by subsequent completion-service enters.
timeout_wheel_tick: DurationNonzero operation deadline granularity, defaulting to 5 milliseconds.
Smaller ticks improve precision but increase wheel storage and service frequency. Configuration must fit within 1,048,576 wheel slots.
Trait Implementations§
Source§impl Clone for RingConfig
impl Clone for RingConfig
Source§impl Debug for RingConfig
impl Debug for RingConfig
Auto Trait Implementations§
impl Freeze for RingConfig
impl RefUnwindSafe for RingConfig
impl Send for RingConfig
impl Sync for RingConfig
impl Unpin for RingConfig
impl UnsafeUnpin for RingConfig
impl UnwindSafe for RingConfig
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
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> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> ⓘ
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> ⓘ
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