'How to change Android "config.xml" values for low memory killer
I'm trying to tune these two low memory killer (lmk) values on my Pixel 4XL with Android 12:
<integer name="config_lowMemoryKillerMinFreeKbytesAbsolute">-1</integer>
<integer name="config_lowMemoryKillerMinFreeKbytesAdjust">0</integer>
According to this, "These thresholds can be configured with the config.xml framework."
How can I change these values? Is there an equivalent "prop" I can set with setprop?
Solution 1:[1]
Unfortunately there is no Android property for setting these thresholds. They are seen as constants in the code and can be changed only within the config.xml
This is the documentation link where the semantics of these constants is described.
Furthermore it is worth noting that the mentioned constants are relevant only for the LMKD legacy mode, e.g. in case of property ro.lmk.use_minfree_levels
being set to true
.
Exploring the LMKD documentation you may find that there are at least 2 alternatives out there:
- using vmpressure signals
- using PSI (pressure stall information) monitors
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |