Commit 5dec840
mm: Tweak memory pressure for 3/4GB RAM devices
• AOSP’s Lighter Memory Footprint:
Stock Android (AOSP) has fewer background processes than MIUI,
HyperOS. A higher value (`20`) reduces unnecessary app/process
killing, improving multitasking.
• Reduces App Reloads:
With `20`, the kernel waits longer before reclaiming memory.
Apps stay cached in RAM longer, reducing reload times when
switching between them.
• Safer for Low-Memory Devices:
On a 4GB RAM device, setting this too high (e.g., `50`) could risk
out-of-memory (OOM) crashes. `20` balances stability and performance.
• Battery Efficiency:
Fewer app reloads = fewer storage I/O operations, which is
especially important for UFS storage longevity.
| Scenario | watermark_scale_factor=10 (Xiaomi) |
watermark_scale_factor=20 (AOSP) |
|-------------------------|--------------------------------------|-------------------------------------|
| App Background Limits | Kills apps quickly | Allows ~2x more apps in
RAM | | UI Smoothness | Frequent stutters due to reclaim | Smoother
multitasking | | Battery Impact | Higher CPU usage from app reloads |
Lower CPU/storage I/O |
[TogoFire]: Note: lahaina is 8/12GB RAM. For phones with more RAM, we
can tweak the memory settings a bit to make multitasking smoother. Here
are some good starting points, but remember to test and adjust based on
your own experience:
4GB RAM: 20
6GB RAM: 25-30
8GB RAM: 30-40
12GB RAM: 40-50
6/8GB RAM: 25-35
8/12GB RAM: 35-45
Change-Id: I45d25a23ceb5174769160d24c7f26f843c827c0c
Signed-off-by: Kanishk <kanishkthederp@gmail.com>
Signed-off-by: TogoFire <togofire@mailfence.com>
[ryxpace: test with 30 for 6/8GB RAM]
Signed-off-by: ryxpace <ryxpace@proton.me>1 parent f74a7be commit 5dec840
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
359 | | - | |
| 359 | + | |
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| |||
0 commit comments