pub struct PartitionConfig {
pub placement: Placement,
pub bind_memory: bool,
pub threads_per_partition: Option<usize>,
}Expand description
Placement plus the knobs the partitioned engine reads alongside it.
Fields§
§placement: PlacementHow partitions map onto the machine.
bind_memory: boolWhether each pool’s workers bind their allocations to the partition’s NUMA node (Python’s pin_memory=).
threads_per_partition: Option<usize>Workers in every partition’s pool (at least one) on the CPU set the placement resolved, or None for the placement’s own count.
A measurement knob for holding the total thread count fixed across partition counts; it overrides a device partition’s small host pool too.
Implementations§
Source§impl PartitionConfig
impl PartitionConfig
Sourcepub fn num_partitions(&self) -> Result<usize, TopologyError>
pub fn num_partitions(&self) -> Result<usize, TopologyError>
The partition count the placement resolves to on this machine, without building any pool.
§Errors
TopologyError::NotPowerOfTwo if an explicit or unpinned partition count is not a power of two, TopologyError::EmptySet if an explicit set is empty, and TopologyError::CpuNotAllowed if an explicit set names a CPU outside the affinity mask.
Trait Implementations§
Source§impl Clone for PartitionConfig
impl Clone for PartitionConfig
Source§fn clone(&self) -> PartitionConfig
fn clone(&self) -> PartitionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for PartitionConfig
impl Debug for PartitionConfig
Source§impl Default for PartitionConfig
impl Default for PartitionConfig
Source§impl PartialEq for PartitionConfig
impl PartialEq for PartitionConfig
impl Eq for PartitionConfig
impl StructuralPartialEq for PartitionConfig
Auto Trait Implementations§
impl Freeze for PartitionConfig
impl RefUnwindSafe for PartitionConfig
impl Send for PartitionConfig
impl Sync for PartitionConfig
impl Unpin for PartitionConfig
impl UnwindSafe for PartitionConfig
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
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