Configuring memory allocation¶
To configure memory allocation, you must tune the memory_limit attributes of high and max for the
QM partition.
The max value represents the maximum limit for memory use in the QM partition. If QM processes attempt to exceed the max limit, the
Out of Memory (OOM) killer is initiated. The high value is the
memory threshold that the kernel tries not to exceed. If QM processes reach the high limit, the kernel will proactively release memory.
Prerequisites
- Podman is installed.
- The
automotive-image-buildertool is installed. - A custom manifest file with a QM partition, such as the manifest file that you created in Embedding containerized applications in the QM partition.
Procedure
-
In your manifest file, configure the
memory_limitattributesmaxandhighto40%and35%, respectively:
Verification
-
Build a disk image:
-
Run the image:
-
After the image starts, log in as
rootusing the passwordpassword. -
Use the
systemctl showcommand to display theMemoryMaxvalue generated by themaxoption you set in your manifest: -
Use the
systemctl showcommand to display theMemoryHighvalue generated by thehighoption you set in your manifest: -
Review the contents of the drop-in file generated by your manifest using the
catcommand:
Additional resources