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
- 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 the image:
Important
This documentation is in the process of being adjusted for the changes implemented in Automotive Image Builder 1.1.4. In the meantime, to keep the sample commands in this documentation valid, you must use the deprecated CLI, as shown in this example.
-
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