Struct aws_sdk_greengrassv2::types::SystemResourceLimits
source · #[non_exhaustive]pub struct SystemResourceLimits {
pub memory: i64,
pub cpus: f64,
}Expand description
Contains information about system resource limits that the IoT Greengrass Core software applies to a component's processes. For more information, see Configure system resource limits for components.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.memory: i64The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.
cpus: f64The maximum amount of CPU time that a component's processes can use on the core device. A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the IoT Greengrass Core software doesn't limit the component's CPU usage.
Implementations§
source§impl SystemResourceLimits
impl SystemResourceLimits
sourcepub fn memory(&self) -> i64
pub fn memory(&self) -> i64
The maximum amount of RAM, expressed in kilobytes, that a component's processes can use on the core device.
sourcepub fn cpus(&self) -> f64
pub fn cpus(&self) -> f64
The maximum amount of CPU time that a component's processes can use on the core device. A core device's total CPU time is equivalent to the device's number of CPU cores. For example, on a core device with 4 CPU cores, you can set this value to 2 to limit the component's processes to 50 percent usage of each CPU core. On a device with 1 CPU core, you can set this value to 0.25 to limit the component's processes to 25 percent usage of the CPU. If you set this value to a number greater than the number of CPU cores, the IoT Greengrass Core software doesn't limit the component's CPU usage.
source§impl SystemResourceLimits
impl SystemResourceLimits
sourcepub fn builder() -> SystemResourceLimitsBuilder
pub fn builder() -> SystemResourceLimitsBuilder
Creates a new builder-style object to manufacture SystemResourceLimits.
Trait Implementations§
source§impl Clone for SystemResourceLimits
impl Clone for SystemResourceLimits
source§fn clone(&self) -> SystemResourceLimits
fn clone(&self) -> SystemResourceLimits
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SystemResourceLimits
impl Debug for SystemResourceLimits
source§impl PartialEq for SystemResourceLimits
impl PartialEq for SystemResourceLimits
impl StructuralPartialEq for SystemResourceLimits
Auto Trait Implementations§
impl Freeze for SystemResourceLimits
impl RefUnwindSafe for SystemResourceLimits
impl Send for SystemResourceLimits
impl Sync for SystemResourceLimits
impl Unpin for SystemResourceLimits
impl UnwindSafe for SystemResourceLimits
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit)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