Overview
Many smartphone manufacturers aggressively market “Virtual RAM,” “RAM Plus,” or “Dynamic RAM Expansion,” which allocate several gigabytes of internal flash storage as a secondary swap partition. On older devices with 2GB–3GB of physical RAM, swap can prevent out-of-memory crashes. However, on modern smartphones equipped with 8GB, 12GB, 16GB, or more of high-speed LPDDR physical RAM, swap is not only redundant—it actively hinders performance.
Because flash storage operates orders of magnitude slower than physical RAM, paging memory back and forth induces I/O latency, micro-stutters during app switching, and accelerates wear on the device’s internal flash storage chips.
Developed by rompelhd, Swap-Disabler is a systemless Magisk module that automatically executes swapoff commands during startup, permanently disabling active disk swap files and virtual RAM mechanisms.
Advantages of Disabling Swap on High-RAM Devices
- Eliminates Storage Wear: Prevents hundreds of gigabytes of unnecessary background write operations to internal UFS flash over months of daily use.
- Smoother App Switching: Applications kept in fast physical RAM wake up instantly without waiting for compressed flash pages to swap in.
- Reduces CPU Workload: Eliminates the CPU cycles the kernel spends calculating compression algorithms and managing swap tables.
Installation & Verification
- Verify that your device has at least 8 GB of physical RAM.
- Download the latest
Swap-Disabler-v*.ziparchive from GitHub releases. - Flash the package in Magisk.
- Reboot your device.
- In Termux or an ADB shell, verify that swap has been disabled:
(The Swap row should reportsu -c free -m0total and0used).
