pub struct RayonConfig {
pub cpu_threads: Option<usize>,
pub reserved_cpu_cores: usize,
pub rpc_threads: Option<usize>,
pub storage_threads: Option<usize>,
pub max_blocking_tasks: usize,
pub proof_storage_worker_threads: Option<usize>,
pub proof_account_worker_threads: Option<usize>,
}rayon only.Expand description
Configuration for the rayon thread pools.
Fields§
§cpu_threads: Option<usize>Number of threads for the general CPU pool.
If None, derived from available parallelism minus reserved cores.
reserved_cpu_cores: usizeNumber of CPU cores to reserve for OS and other processes.
rpc_threads: Option<usize>Number of threads for the RPC blocking pool (trace calls, eth_getProof, etc.).
If None, uses the same as cpu_threads.
storage_threads: Option<usize>Number of threads for the storage I/O pool (static file, RocksDB writes in
save_blocks). If None, uses DEFAULT_STORAGE_POOL_THREADS.
max_blocking_tasks: usizeMaximum number of concurrent blocking tasks for the RPC guard semaphore.
proof_storage_worker_threads: Option<usize>Number of threads for the proof storage worker pool (trie storage proof workers).
If None, derived from available parallelism.
proof_account_worker_threads: Option<usize>Number of threads for the proof account worker pool (trie account proof workers).
If None, derived from available parallelism.
Implementations§
Source§impl RayonConfig
impl RayonConfig
Sourcepub const fn with_reserved_cpu_cores(self, reserved_cpu_cores: usize) -> Self
pub const fn with_reserved_cpu_cores(self, reserved_cpu_cores: usize) -> Self
Set the number of reserved CPU cores.
Sourcepub const fn with_max_blocking_tasks(self, max_blocking_tasks: usize) -> Self
pub const fn with_max_blocking_tasks(self, max_blocking_tasks: usize) -> Self
Set the maximum number of concurrent blocking tasks.
Sourcepub const fn with_rpc_threads(self, rpc_threads: usize) -> Self
pub const fn with_rpc_threads(self, rpc_threads: usize) -> Self
Set the number of threads for the RPC blocking pool.
Sourcepub const fn with_storage_threads(self, storage_threads: usize) -> Self
pub const fn with_storage_threads(self, storage_threads: usize) -> Self
Set the number of threads for the storage I/O pool.
Sourcepub const fn with_proof_storage_worker_threads(
self,
proof_storage_worker_threads: usize,
) -> Self
pub const fn with_proof_storage_worker_threads( self, proof_storage_worker_threads: usize, ) -> Self
Set the number of threads for the proof storage worker pool.
Sourcepub const fn with_proof_account_worker_threads(
self,
proof_account_worker_threads: usize,
) -> Self
pub const fn with_proof_account_worker_threads( self, proof_account_worker_threads: usize, ) -> Self
Set the number of threads for the proof account worker pool.
Trait Implementations§
Source§impl Clone for RayonConfig
impl Clone for RayonConfig
Source§fn clone(&self) -> RayonConfig
fn clone(&self) -> RayonConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RayonConfig
impl Debug for RayonConfig
Auto Trait Implementations§
impl Freeze for RayonConfig
impl RefUnwindSafe for RayonConfig
impl Send for RayonConfig
impl Sync for RayonConfig
impl Unpin for RayonConfig
impl UnwindSafe for RayonConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
Source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
Source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 96 bytes