Memory allocation¶
The memory_limit
attributes high
and max
control how much memory is allocated to the QM partition.
-
high
controls the throttling limit for memory use in the QM partition. The value ofhigh
can be set in bytes or as a percentage value. -
max
controls the absolute limit for memory use in the QM partition. Themax
attribute can also be in bytes or a percentage value.
You can configure these values in the qm
stage of your Automotive Image Builder manifest file.
Out of Memory killer¶
The Linux kernel memory management system includes the Out of Memory (OOM) killer. The OOM killer terminates processes to release memory when memory becomes critically low. This mechanism ensures that critical processes in the root partition have enough memory to continue to run.
The oom_score_adj
parameter influences the likelihood that a process will be terminated by the OOM killer. When an operating system experiences
memory constraints, the OOM killer uses the processes’ oom_score_adj
values to prioritize which processes to terminate.
The value of oom_score_adj
can range from 1000
to -1000
. The OOM killer terminates processes with the highest oom_score_adj
values first. If a process is set to -1000
, the OOM killer cannot terminate it, whereas the OOM killer would terminate a process set to
1000
first.
When Podman starts a container nested in the QM partition, it writes the default value of 750
into /proc/$PID/oom_score_adj
. For more
information about oom_score_adj
, refer to man 5 proc_pid_oom_score_adj
.