Struct cgroups::MemoryResources
source · pub struct MemoryResources {
pub update_values: bool,
pub kernel_memory_limit: u64,
pub memory_hard_limit: u64,
pub memory_soft_limit: u64,
pub kernel_tcp_memory_limit: u64,
pub memory_swap_limit: u64,
pub swappiness: u64,
}
Expand description
Resource limits for the memory subsystem.
Fields
update_values: bool
Whether values should be applied to the controller.
kernel_memory_limit: u64
How much memory (in bytes) can the kernel consume.
memory_hard_limit: u64
Upper limit of memory usage of the control group’s tasks.
memory_soft_limit: u64
How much memory the tasks in the control group can use when the system is under memory pressure.
kernel_tcp_memory_limit: u64
How much of the kernel’s memory (in bytes) can be used for TCP-related buffers.
memory_swap_limit: u64
How much memory and swap together can the tasks in the control group use.
swappiness: u64
Controls the tendency of the kernel to swap out parts of the address space of the tasks to disk. Lower value implies less likely.
Note, however, that a value of zero does not mean the process is never swapped out. Use the
traditional mlock(2)
system call for that purpose.
Trait Implementations
sourceimpl Clone for MemoryResources
impl Clone for MemoryResources
sourcefn clone(&self) -> MemoryResources
fn clone(&self) -> MemoryResources
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for MemoryResources
impl Debug for MemoryResources
sourceimpl Default for MemoryResources
impl Default for MemoryResources
sourcefn default() -> MemoryResources
fn default() -> MemoryResources
Returns the “default value” for a type. Read more
sourceimpl PartialEq<MemoryResources> for MemoryResources
impl PartialEq<MemoryResources> for MemoryResources
sourcefn eq(&self, other: &MemoryResources) -> bool
fn eq(&self, other: &MemoryResources) -> bool
impl Eq for MemoryResources
impl StructuralEq for MemoryResources
impl StructuralPartialEq for MemoryResources
Auto Trait Implementations
impl RefUnwindSafe for MemoryResources
impl Send for MemoryResources
impl Sync for MemoryResources
impl Unpin for MemoryResources
impl UnwindSafe for MemoryResources
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more