pub struct Memory {
pub fail_cnt: u64,
pub limit_in_bytes: i64,
pub usage_in_bytes: u64,
pub max_usage_in_bytes: u64,
pub move_charge_at_immigrate: u64,
pub numa_stat: NumaStat,
pub oom_control: OomControl,
pub soft_limit_in_bytes: i64,
pub stat: MemoryStat,
pub swappiness: u64,
pub use_hierarchy: u64,
}Expand description
State of and statistics gathered by the kernel about the memory usage of the control group’s tasks.
Fields§
§fail_cnt: u64How many times the limit has been hit.
limit_in_bytes: i64The limit in bytes of the memory usage of the control group’s tasks.
usage_in_bytes: u64The current usage of memory by the control group’s tasks.
max_usage_in_bytes: u64The maximum observed usage of memory by the control group’s tasks.
move_charge_at_immigrate: u64Whether moving charges at immigrate is allowed.
numa_stat: NumaStatContains various statistics about the NUMA locality of the control group’s tasks.
The format of this field (as lifted from the kernel sources):
total=<total pages> N0=<node 0 pages> N1=<node 1 pages> ...
file=<total file pages> N0=<node 0 pages> N1=<node 1 pages> ...
anon=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
unevictable=<total anon pages> N0=<node 0 pages> N1=<node 1 pages> ...
hierarchical_<counter>=<counter pages> N0=<node 0 pages> N1=<node 1 pages> ...oom_control: OomControlVarious statistics and control information about the Out Of Memory killer.
soft_limit_in_bytes: i64Allows setting a limit to memory usage which is enforced when the system (note, not the control group) detects memory pressure.
stat: MemoryStatContains a wide array of statistics about the memory usage of the tasks in the control group.
swappiness: u64Set the tendency of the kernel to swap out parts of the address space consumed by the control group’s tasks.
Note that setting this to zero does not prevent swapping, use mlock(2) for that
purpose.
use_hierarchy: u64If set, then under OOM conditions, the kernel will try to reclaim memory from the children of the offending process too. By default, this is not allowed.