Abstract
Mobile systems and applications are becoming increasingly feature-rich and powerful, which constantly suffer from memory pressure, especially for devices equipped with limited DRAM. Swapping inactive DRAM pages to the storage device is a promising solution to extend the physical memory. However, existing mobile devices usually adopt flash memory as the storage device, where swapping DRAM pages to flash memory may introduce significant performance overhead. In this paper, we first conduct an in-depth analysis of the I/O characteristics of the flash-based memory swapping, including the I/O interference and swap I/O randomness in swap subsystem. Then an I/O efficiency optimization framework for memory swapping (IOSR) is proposed to enhance the performance of flash-based memory swapping for mobile devices. IOSR consists of two methods: swap I/O scheduling (SIOS) and swap I/O pattern reshaping (SIOR). SIOS is designed to schedule the swap I/O to reduce interference with other processes I/Os. SIOR is designed to reshape the swap I/O pattern with process-oriented swap slot allocation and adaptive granularity swap read-ahead. IOSR is implemented on Google Pixel 4. Experimental results show that IOSR reduces the application switching time by 31.7% and improves the swap-in bandwidth by 35.5% on average compared to the state-of-the-art.
- [1] 2023. All Xiaomi that will have the RAM Expansion Function. https://www.xiaomist.com/2021/07/these-are-all-xiaomi-that-can-already.htmlGoogle Scholar
- [2] 2023. AndroBench. http://www.androbench.org/wiki/AndroBenchGoogle Scholar
- [3] 2023. Android Debug Bridge(Adb): Android Developers. https://developer.android.com/studio/command-line/adbGoogle Scholar
- [4] 2023. Android RAM Management Tips and Tricks. https://www.droidviews.com/android-ram-management/Google Scholar
- [5] 2023. Blktrace. https://man7.org/linux/man-pages/man8/blktrace.8.htmlGoogle Scholar
- [6] 2023. How the UFS 4.0 Storage Standard will Improve your Phone’s Performance. https://thenextweb.com/news/ufs-4-0-samsung-phone-stroage-analysisGoogle Scholar
- [7] 2023. Huawei’s Memory Expansion Technology: 8GB RAM Works as 10GB and 12GB RAM as 14GB: Huawei Community. https://consumer.huawei.com/ae-en/community/details/Huawei-s-Memory-Expansion-Technology-8GB-RAM-works-as-10GB-and-12GB-RAM-as-14GB/topicId_121377/Google Scholar
- [8] 2023. Keeping your App Responsive: Android Developers. https://developer.android.com/training/articles/perf-anrGoogle Scholar
- [9] 2023. Linux Reverse Mapping (rmap). https://lwn.net/Articles/23732/Google Scholar
- [10] 2023. Low Memory Killer Daemon: Android Developers Docs. https://source.android.com/docs/core/perf/lmkdGoogle Scholar
- [11] 2023. Low Memory Management: Android Developers. https://developer.android.com/topic/performance/memory-managementGoogle Scholar
- [12] 2023. OPPO Introduces New Memory Expansion Technology for its Reno5 Series, A94 and A74 Series Smartphones. https://www.oppo.com/sg/newsroom/press/oppo-introduces-new-memory-expansion-technology/Google Scholar
- [13] 2023. Optimize for Doze and App Standby. https://developer.android.com/training/monitoring-device-state/doze-standbyGoogle Scholar
- [14] 2023. Profile Battery Usage with Batterystats and Battery Historian. https://developer.android.com/topic/performance/power/setup-battery-historianGoogle Scholar
- [15] 2023. SwapPss. https://www.kernel.org/doc/html/latest/filesystems/proc.html?highlight=PssGoogle Scholar
- [16] 2023. UI/Application Exerciser Monkey: Android Developers. https://developer.android.com/studio/test/other-testing-tools/monkeyGoogle Scholar
- [17] 2023. Vmstat. https://en.wikipedia.org/wiki/VmstatGoogle Scholar
- [18] 2023. What is RAM Plus and How to Use It? https://www.samsung.com/sg/support/mobile-devices/what-is-ram-plus-and-how-to-use-it/Google Scholar
- [19] . 2016. The design of an efficient swap mechanism for hybrid DRAM-NVM systems. In 2016 International Conference on Embedded Software (EMSOFT’16). 1–10.Google ScholarDigital Library
- [20] . 2023. The BFQ I/O Scheduler. https://lwn.net/Articles/601799/Google Scholar
- [21] . 2015. mars: Mobile application relaunching speed-up through flash-aware page swapping. IEEE Trans. Comput. 65, 3 (2015), 916–928.Google ScholarDigital Library
- [22] . 2023. ZRAM: Compressed RAM-based Block Devices. https://www.kernel.org/doc/html/latest/admin-guide/blockdev/zram.htmlGoogle Scholar
- [23] . 2018. FastTrack: Foreground app-aware I/O management for improving user experience of Android smartphones. In 2018 USENIX Annual Technical Conference (USENIX ATC’18). USENIX Association, 15–28.Google Scholar
- [24] . 2022. GuardedErase: Extending SSD lifetimes by protecting weak wordlines. In 20th USENIX Conference on File and Storage Technologies (FAST’22). USENIX Association, 133–146.Google Scholar
- [25] . 2015. Boosting quasi-asynchronous I/O for better responsiveness in mobile devices. In 13th USENIX Conference on File and Storage Technologies (FAST’15). USENIX Association, 191–202.Google ScholarDigital Library
- [26] . 2013. I/O stack optimization for smartphones. In 2013 USENIX Annual Technical Conference (USENIX ATC’13). USENIX Association, 309–320.Google Scholar
- [27] . 2011. FAST: Quick application launch on solid-state drives. In 9th USENIX Conference on File and Storage Technologies (FAST’11). USENIX Association, 101–114.Google Scholar
- [28] . 2011. Aciom: Application characteristics-aware disk and network I/O management on Android platform. In 2011 Proceedings of the Ninth ACM International Conference on Embedded Software (EMSOFT’11) (EMSOFT’16). 49–58.Google ScholarDigital Library
- [29] . 2017. Enlightening the I/O path: A holistic approach for application performance. In 15th USENIX Conference on File and Storage Technologies (FAST’17). USENIX Association, 345–358.Google Scholar
- [30] . 2016. SmartLMK: A memory reclamation scheme for improving user-perceived app launch time. ACM Transactions on Embedded Computing Systems (TECS) 15, 3, Article
47 (2016), 25 pages.Google ScholarDigital Library - [31] . 2017. Application-aware swapping for mobile systems. ACM Transactions on Embedded Computing Systems (TECS) 16, 5s, Article
182 (2017), 19 pages.Google ScholarDigital Library - [32] . 2020. End the senseless killing: Improving memory management for mobile operating systems. In 2020 USENIX Annual Technical Conference (USENIX ATC’20). USENIX Association, 873–887.Google Scholar
- [33] . 2020. SEAL: User experience-aware two-level swap for mobile devices. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems 39, 11 (2020), 4102–4114.Google ScholarCross Ref
- [34] . 2021. MobileSwap: Cross-device memory swapping for mobile devices. In 2021 58th ACM/IEEE Design Automation Conference (DAC’21). 115–120.Google ScholarDigital Library
- [35] . 2020. Acclaim: Adaptive memory reclaim to improve user experience in Android systems. In 2020 USENIX Annual Technical Conference (USENIX ATC’20). USENIX Association, 897–910.Google Scholar
- [36] . 2015. Reducing smartphone application delay through read/write isolation. In Proceedings of the 13th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys’15). Association for Computing Machinery, 287–300.Google ScholarDigital Library
- [37] . 2021. ASAP: Fast mobile application switch via adaptive prepaging. In 2021 USENIX Annual Technical Conference (USENIX ATC’21). USENIX Association, 365–380.Google Scholar
- [38] . 2010. Extending SSD lifetimes with disk-based write caches. In 8th USENIX Conference on File and Storage Technologies (FAST’10), Vol. 10. USENIX Association, 101–114.Google Scholar
- [39] . 2021. Killing processes or killing flash? Escaping from the dilemma using lightweight, compression-aware swap for mobile devices. ACM Transactions on Embedded Computing Systems (TECS) 20, 5s, Article
90 (2021), 24 pages.Google ScholarDigital Library - [40] . 2023. Swap: Virtual Swap Readahead. https://lwn.net/Articles/336810/Google Scholar
- [41] . 2017. SmartSwap: High-performance and user experience friendly swapping in mobile systems. In 2017 54th ACM/EDAC/IEEE Design Automation Conference (DAC’17). 1–6.Google ScholarDigital Library
Index Terms
- IOSR: Improving I/O Efficiency for Memory Swapping on Mobile Devices Via Scheduling and Reshaping
Recommendations
Using DRAM as Cache for Non-Volatile Main Memory Swapping
The performance of mobile devices such as smartphones and tablets has been rapidly improving in recent years. However, these improvements have been seriously affecting power consumption. One of the greatest challenges is to achieve efficient power ...
Write Activity Minimization for Nonvolatile Main Memory Via Scheduling and Recomputation
Nonvolatile memories such as Flash memory, phase change memory (PCM), and magnetic random access memory (MRAM) have many desirable characteristics for embedded systems to employ them as main memory. However, there are two common challenges we need to ...
Minimizing write activities to non-volatile memory via scheduling and recomputation
SASP '10: Proceedings of the 2010 IEEE 8th Symposium on Application Specific Processors (SASP)Non-volatile memories, such as flash memory, Phase Change Memory (PCM), and Magnetic Random Access Memory (MRAM), have many desirable characteristics for embedded DSP systems to employ them as main memory. These characteristics include low-cost, shock-...
Comments