MIUI is a forked version of Android developed by Xiaomi with plenty of additional features and tweaks not found in stock AOSP ROM. MIUI by default is very aggressive at killing apps running in the background, as a result it is unable to keep more than 3-4 apps in the memory while multitasking or after waking up the device. Default settings are aimed to keep as much free RAM as possible that’s where the problem lies. It kills the background running apps to keep most of its RAM free. Apps get killed and have to be reloaded again from the flash storage into the memory, this takes a lot of CPU, I/O cycles and makes the end user experience less enjoyable. Below settings might make your multitasking a bit better at the cost of less free RAM, but that shouldn’t matter as RAM is meant to be used not kept free. Always remember “Free RAM is wasted RAM“. This guide works on all MIUI8 China/Global ROMs with Beta/Stable versions.
Settings App > Additional Settings > Battery and Performance > Manage Apps Battery Usage > Power Saving Modes
– Off: All background data and location access of running apps will be enabled, less battery life
– On: Default Setting, more battery life
Settings App > Battery and Performance > Manage Apps Battery Usage > Choose apps
– From there you can configure the background data and location services for each app
Settings App > Additional Settings > Battery and Performance > System Animations
– Hide System Animations: Speeds up device’s performance
To enable Developer Options: Settings App > About Phone > MIUI Version > Keep on tapping till it is enabled. Now go to Settings App > Additional Settings > Developer Options
– Window Animation Scale: 0.5x or Off
– Transition Animation Scale: 0.5x or Off
– Animator Animation Scale: 0.5x or Off
– Don’t Keep Activities: Disabled
– Background Process Limit: Standard Limit
– Memory Optimization: Off
– Show All ANRs: Disabled
– Force-Closed Apps: Disabled
– Turn On MIUI Optimization: Disabled
Security App Settings
Security App > Settings > Cleaner
– Remind To Clean: Disabled
– Scan App Memory: Disabled
– Update Automatically: Disabled
Security App > Settings > Blocklist > Disabled
Security App > Settings > Battery Usage
– Turn Off Mobile Data: Never
– Clear Cache: Never
Security App > Permissions > Autostart
– Disable unnecessary apps, they won’t be launched after every reboot
– Keep important apps enabled such as messaging, email apps
Lock Apps In Memory
You can lock your most frequently used apps in the memory.
– Open your app, let it get fully launched, open the recent apps menu.
– Swipe down the app icon or recent app screen to reveal a lock icon on top left corner.
– Tap the lock, this locks the app into the memory and it won’t get force killed in the background.
– To unlock the app, repeat the same process and tap it again to unlock it from memory.
After doing the above changes, restart your device. You might have to reapply these changes after every MIUI OTA update. These settings have hardly any effect on the battery life.
Wiki: What does each and every option do?
Memory Optimization: This option sets the swap file for multitasking, size varies depending on the Xiaomi device.
– High: 700MB to 1GB
– Middle: 700MB to 1GB
– Low: Swap file disabled
– Off: Swap file disabled
Show All ANRs: This option enables MIUI to show an obtrusive dialogue box after an app fails to stop responding. Setting this off doesn’t show the pop-up frequently.
Force-Closed Apps: This option enables MIUI to show an obtrusive dialogue box after an app force-closes unexpectedly. Setting this off doesn’t show the message. It enables after every reboot.
Turn On MIUI Optimization: This option enables a plethora of MIUI based settings and optimizations as per the guidelines set by the MIUI developers. It helps to load the app and the app data in parallel reducing load times and ensuring snappier user experience. This setting can sometimes cause a variety of issues on non-MIUI based apps such as Google apps and apps from Google Play store. It’s better to disable if you rely on Google Play store for apps and services or use MIUI Global Stable/Beta ROMs. MIUI China ROM users should leave the setting as it is.
With the MIUI Optimization enabled, some users reported the following issues
– Cannot set third-party launcher like Nova, Apex or Google Now Launcher.
– Wallpaper cannot be set using inbuilt options via custom launchers.
– Occasional lags, stutters or freezes while scrolling webpages and long lists.
– Custom apps set as default restore to default MIUI apps on reboot. (Only on MIUI China ROMs)
– Cannot set accessibility services on reboot.
– Background apps cannot sync data.
– Music players stop playing after some time.
– UI animations are not synced properly.
After turning disabling MIUI optimization
– Most of the above issues get solved.
– Settings > Data Usage > Graph changes to AOSP style.
– Settings > Battery and Performance > Battery Use > Graph changes to AOSP style.
– Settings > Installed Apps > All > Documents > It will not be disabled after every reboot.
– Settings > Additional Settings > Buttons > Settings may get reset.
– No OTA update notifications. Enable it to receive the OTA updates.