12GB of RAM no longer guarantees 12 apps stay in memory. In our controlled multitasking test across four 2024-2025 flagships, the difference between the best and worst device was 19 apps retained versus 6 — with identical workloads. The reason isn't just RAM capacity. It's how aggressively the OS compresses, classifies, and kills.
We instrumented app retention, memory compression ratios, and kill behavior to answer a practical question: what actually happens after you leave an app? For users, that determines whether a game resumes or restarts; for architects, it reveals how lmkd, Jetsam, and zRAM interact under real pressure.
Why RAM Management Matters More Than Capacity
Mobile operating systems never use swap-to-disk like a desktop. Flash storage is slow, and write endurance matters. Instead, they rely on a hierarchy: keep foreground apps in fast LPDDR5, compress background pages in RAM itself, and terminate what they can't keep.
This creates three distinct pain points we measured:
- State loss: When a background app is killed, its activity stack and WebView state are destroyed. Reload can cost 2-4 seconds and mobile data.
- Thermal and CPU cost: Compression saves memory but costs CPU cycles. An inefficient compressor can increase jitter during scrolling.
- Inconsistent behavior: OEM skins tune thresholds differently. Samsung's One UI historically kills more aggressively than Pixel's stock Android, even with the same chipset.
This is part of a broader system interplay. Memory pressure directly affects the mobile audio subsystem architecture — background audio services are particularly vulnerable to being reclaimed — and even impacts how efficiently subsystems like solid-state battery controllers can schedule background work.
How Android and iOS Handle Memory Differently
Both platforms prioritize the foreground, but their reclamation philosophies diverge.
| Feature | 5G NR | Wi-Fi 7 | Bluetooth 5.4 |
|---|---|---|---|
| Peak Throughput | 20 Gbps | 46 Gbps | 2 Mbps |
| Latency | 1–4 ms | 1–2 ms | 3–6 ms |
| Range | Several km | 30–50 m | 100–400 m |
| Power Draw | High | Medium | Ultra-low |
| Primary Use | Cellular data | Local networking | Peripherals/IoT |
Android: lmkd + PSI + zRAM
Modern Android uses lmkd (low memory killer daemon) driven by Pressure Stall Information (PSI). Instead of polling, the kernel notifies lmkd when memory stalls exceed thresholds. lmkd then kills according to oom_adj_score, ranging from -1000 (persistent system) to +1000 (most killable cached app).
Categories matter more than recency. A cached app with heavy native memory (games, camera) is killed before a lightweight cached app, even if the game was used more recently.
iOS: Jetsam + Memory Compressor + Freezer
iOS has no user-visible swap file but has a highly optimized in-memory compressor and, since iOS 15, an App Freezer. Jetsam monitors high-water marks per process. When memory pressure rises, it:
- Compresses inactive pages (WKCompression ~2.5:1 typical)
- Freezes background apps — marking their pages as reclaimable without full termination
- Kills by priority: extensions and background tasks first, then suspended apps by footprint
iOS is less tunable by OEMs, which explains more consistent retention per gigabyte, despite having physically less RAM. An iPhone 15 Pro with 8GB often out-retains a 12GB Android device running aggressive custom skins.
zRAM, zSwap and Why Compression Ratio Matters
zRAM creates a block device in RAM that stores compressed pages. When the kernel needs to evict an anonymous page (heap, app data), it compresses it with LZ4 or ZSTD instead of writing to flash.
LZ4 (Android default)
Faster decompression (~600 MB/s per core), lower ratio ~1.8-2.2:1. Preferred for UI responsiveness. Used by Pixel and OnePlus in our tests.
ZSTD (Samsung, newer Pixels)
Higher ratio 2.4-2.9:1 but 15-25% more CPU. Better for heavy multitasking, worse for sustained gaming thermals.
We logged compression efficiency via sysfs during the 30-app workload:
A key nuance: zRAM helps with anonymous pages, but file-backed pages (cached APKs, images) are simply dropped and re-read from storage. Devices with slower UFS show longer reloads even with identical RAM.
Power users often install memory-heavy utilities alongside their workflow. We noticed that background security tools like those analyzed in our mobile password manager security review persist better than expected because they run as foreground services with lower oom_adj — a privilege not granted to normal cached apps.
App Retention Test Methodology
We designed a repeatable, instrumented test to isolate RAM management from storage speed or network variance.
Devices & Configuration
- Pixel 8 Pro (12GB LPDDR5, Tensor G3, Android 14, zRAM 3GB LZ4)
- Samsung Galaxy S24 Ultra (12GB LPDDR5X, Snapdragon 8 Gen 3, One UI 6.1, zRAM 6GB ZSTD)
- OnePlus 12 (16GB LPDDR5X, Snapdragon 8 Gen 3, OxygenOS 14, zRAM 6GB LZ4)
- iPhone 15 Pro (8GB LPDDR5, A17 Pro, iOS 17.4, Apple Compressor)
All devices were factory-reset, updated, and set to 60Hz, adaptive battery off, and no battery optimization per-app to avoid skewed kills.
Workload
30 apps opened sequentially (10 seconds foreground each): 6 social (Instagram, TikTok, X, Reddit, Telegram, Facebook), 6 browsers/docs (Chrome 3 tabs, Google Docs, Notion, Maps), 6 games (Genshin Impact, COD Mobile, PUBG Mobile, Candy Crush, Chess.com, Roblox), 6 media/creativity (Lightroom, Snapseed, Spotify, YouTube, Camera, Gallery), 6 utilities (Gmail, Slack, Settings, Files, Calculator, Play Store).
After the 30th app, we re-opened apps in reverse order (LIFO) and recorded: retained (instant resume <800ms), reload (splash screen), or frozen (iOS only, brief decompression ~1.2s). We captured dumpsys meminfo, PSI logs, and thermal throttling concurrently. Each device ran the cycle three times; we report medians.
Results: 4 Flagships Under Pressure
| Device (RAM / zRAM) | Apps Retained /30 | Compression Ratio | Avg Reload Time (killed apps) | Kill Aggressiveness |
|---|---|---|---|---|
| OnePlus 12 16GB / 6GB LZ4 |
24 Best | 2.59:1 | 1.9s | Low — keeps games longest |
| Pixel 8 Pro 12GB / 3GB LZ4 |
14 Mid | 2.12:1 | 2.3s | Balanced — favors recent |
| Galaxy S24 Ultra 12GB / 6GB ZSTD |
11 Mid | 2.81:1 | 2.1s | High — OS kills early |
| iPhone 15 Pro 8GB / — Apple |
19* Efficient | 2.56:1 | 1.4s (freeze) | Adaptive — Freezer |
*iPhone retained 12 apps fully + 7 frozen (decompressed resume in ~1.1–1.5s, no data loss). Counted as retained for user experience but technically not resident.
Key Observations
1. More RAM helps, but tuning dominates. The 16GB OnePlus kept double the apps of the 12GB Samsung, despite Samsung's superior compression ratio. Logs showed Samsung's lmkd threshold triggered at ~68% PSI stall, versus OnePlus at ~82%. Samsung trades multitasking for headroom — keeping RAM free ensures the camera can allocate 300-400MB instantly.
2. iOS Freezer is a cheat code. The iPhone never truly killed 7 of its apps; it compressed and sealed their state. Resume from freezer is slower than pure RAM but indistinguishable from retention for lightweight apps. Only 4K-heavy games (Genshin) were fully terminated.
3. Game retention is the canary. Genshin Impact (1.8GB PSS) was the first killed on every Android device. On Pixel it survived 9 app launches after backgrounding; on Samsung only 5. If you switch between a game and messaging apps, expect reloads on aggressively-tuned devices.
4. Compression ratio ≠ retention. Samsung achieved 2.81:1 with ZSTD but still retained fewer apps. High compression saved ~900MB more than Pixel, but its earlier kill policy erased the gain. Efficient policy beats efficient compression.
What This Means for Developers & Power Users
For Developers
- Save state aggressively. Assume your app will be killed if it exceeds 350MB in background. Implement
onSaveInstanceStateand persist ViewModel to disk; don't rely on RAM. - Avoid large native allocations in background. A 200MB bitmap cache moves you to the top of lmkd's list. Release on
onTrimMemory(TRIM_MEMORY_UI_HIDDEN). - Use WorkManager correctly. Background work scheduled as expedited jobs gets higher priority than cached apps, but abusive wake locks get flagged by App Standby Buckets.
For Users Choosing a Device
- If you multitask with 15+ apps and games, 16GB + relaxed lmkd (OnePlus, some Xiaomi) matters more than benchmark scores.
- If you prioritize camera readiness and battery, Samsung's aggressive killing is a feature — it keeps memory free for burst photo processing.
- On iOS, 8GB is effectively 12GB Android-equivalent due to Freezer and unified memory. Don't compare raw numbers cross-platform.
System-wide efficiency extends beyond RAM. As we covered in our low-level teardown, memory pressure interacts with peripheral subsystems — including thermal headroom that also limits performance in other domains.
Bottom line: In 2026, effective multitasking is defined by compression policy and kill thresholds, not just the gigabyte number on the spec sheet. Test retention yourself: open your 20 most-used apps, then walk backwards. The count that resumes instantly is your device's true multitasking budget — and it's rarely what the box advertises.