skip to main content
10.1145/3620666.3651377acmconferencesArticle/Chapter ViewAbstractPublication PagesasplosConference Proceedingsconference-collections
research-article

More Apps, Faster Hot-Launch on Mobile Devices via Fore/Background-aware GC-Swap Co-design

Published: 27 April 2024 Publication History

Abstract

Faster app launching is crucial for the user experience on mobile devices. Apps launched from a background cached state, called hot-launching, have much better performance than apps launched from scratch. To increase the number of hot-launches, leading mobile vendors now cache more apps in the background by enabling swap. Recent work also proposed reducing the Java heap to increase the number of cached apps. However, this paper found that existing methods deteriorate app hot-launch performance while increasing the number of cached apps. To simultaneously improve the number of cached apps and hot-launch performance, this paper proposes Fleet, a foreground/background-aware GC-swap co-design framework. To enhance app-caching capacity, Fleet limits the tracing range of GC to background objects only, avoiding touching long-lifetime foreground objects. To improve hot-launch performance, Fleet identifies objects that will be accessed during the next hot-launch and uses runtime information to guide the swap scheme in the OS. In addition, Fleet aggregates small objects with similar access patterns into the same pages to improve swap efficiency. We implemented Fleet in AOSP and evaluated its performance with different types of apps. Experimental results show that Fleet achieves a 1.59× faster hot-launch time and caches 1.21× more apps than Android.

References

[1]
Milliseconds make millions: A study on how improvements in mobile site speed positively affect a brand's bottom line. https://www2.deloitte.com/content/dam/Deloitte/ie/Documents/Consulting/Milliseconds_Make_Millions_report.pdf.
[2]
Response times: The 3 important limits. https://www.nngroup.com/articles/response-times-3-important-limits/.
[3]
Marvin code, 2019. https://github.com/UWSysLab/marvin-code/ [Accessed: 20-Nov-2023].
[4]
Oppo introduces new memory expansion technology for its reno5 series, a94 and a74 series smartphones, 2021. https://www.oppo.com/sg/newsroom/press/oppo-introduces-new-memory-expansion-technology/ [Accessed: 20-Nov-2023].
[5]
How to use xiaomi virtual ram to speed up your device?, 2022. https://xiaomiui.net/how-to-use-xiaomi-virtual-ram-to-speed-up-your-device-31416/ [Accessed: 20-Nov-2023].
[6]
What is ram plus and how to use it?, 2022. https://www.samsung.com/sg/support/mobile-devices/what-is-ram-plus-and-how-to-use-it/ [Accessed: 20-Nov-2023].
[7]
Android debug bridge (adb) tool, 2023. https://developer.android.com/studio/command-line/adb [Accessed: 20-Nov-2023].
[8]
App startup time | app quality | android developers, 2023. https://developer.android.com/topic/performance/vitals/launch-time [Accessed: 20-Nov-2023].
[9]
Capture a system trace on a device, 2023. https://developer.android.com/topic/performance/tracing/on-device/ [Accessed: 20-Nov-2023].
[10]
Debugging art garbage collection, 2023. https://source.android.com/docs/core/runtime/gc-debug/ [Accessed: 20-Nov-2023].
[11]
High voltage power monitor | monsoon solutions | bellevue, 2023. https://www.msoon.com/high-voltage-power-monitor/ [Accessed: 20-Nov-2023].
[12]
Memory allocation among processes, 2023. https://developer.android.com/topic/performance/memory-management/ [Accessed: 20-Nov-2023].
[13]
Memory swapping: What it is and how it works, 2023. https://forum.huawei.com/enterprise/en/memory-swapping-what-it-is-and-how-it-works/thread/696666286131658752-667213860488228864/ [Accessed: 20-Nov-2023].
[14]
Perfetto - system profiling, app tracing and trace analysis, 2023. https://perfetto.dev/ [Accessed: 20-Nov-2023].
[15]
Ui jank detection, 2023. https://developer.android.com/studio/profile/jank-detection/ [Accessed: 20-Nov-2023].
[16]
ssvb/tinymembench: Simple benchmark for memory throughput and latency, 2024. https://github.com/ssvb/tinymembench [Accessed: 10-Mar-2024].
[17]
Welcome to fio's documentation!, 2024. https://fio.readthedocs.io/en/latest/index.html [Accessed: 10-Mar-2024].
[18]
Shoaib Akram, Jennifer B. Sartor, Kathryn S. McKinley, and Lieven Eeckhout. Write-rationing garbage collection for hybrid memories. In Jeffrey S. Foster and Dan Grossman, editors, Proceedings of the 39th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2018, Philadelphia, PA, USA, June 18-22, 2018, pages 62--77. ACM, 2018.
[19]
Emery D. Berger, Benjamin G. Zorn, and Kathryn S. McKinley. Reconsidering custom memory allocation. In Mamdouh Ibrahim and Satoshi Matsuoka, editors, Proceedings of the 2002 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications, OOPSLA 2002, Seattle, Washington, USA, November 4-8, 2002, pages 1--12. ACM, 2002.
[20]
Stephen M. Blackburn and Kathryn S. McKinley. Immix: a mark-region garbage collector with space efficiency, fast collection, and mutator performance. In Rajiv Gupta and Saman P. Amarasinghe, editors, Proceedings of the ACM SIGPLAN 2008 Conference on Programming Language Design and Implementation, Tucson, AZ, USA, June 7-13, 2008, pages 22--32. ACM, 2008.
[21]
Michael D. Bond and Kathryn S. McKinley. Tolerating memory leaks. In Gail E. Harris, editor, Proceedings of the 23rd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2008, October 19-23, 2008, Nashville, TN, USA, pages 109--126. ACM, 2008.
[22]
Stuart K Card, George G Robertson, and Jock D Mackinlay. The information visualizer, an information workspace. In Proceedings of the SIGCHI Conference on Human factors in computing systems, pages 181--186, 1991.
[23]
Tao Deng, Shaheen Kanthawala, Jingbo Meng, Wei Peng, Anastasia Kononova, Qi Hao, Qinhao Zhang, and Prabu David. Measuring smart-phone usage and task switching with log tracking and self-reports. Mobile Media & Communication, 7(1):3--23, 2019.
[24]
Paulo Ferreira and Marc Shapiro. Garbage collection and DSM consistency. In Proceedings of the First USENIX Symposium on Operating Systems Design and Implementation (OSDI), Monterey, California, USA, November 14-17, 1994, pages 229--241. USENIX Association, 1994.
[25]
Weichao Guo, Kang Chen, Huan Feng, Yongwei Wu, Rui Zhang, and Weimin Zheng. MARS: Mobile application relaunching speed-up through flash-aware page swapping. IEEE Trans. Computers, 65(3):916--928, 2016.
[26]
Sangwook Shane Hahn, Sungjin Lee, Inhyuk Yee, Donguk Ryu, and Jihong Kim. {FastTrack}: Foreground {App-Aware} {I/O} management for improving user experience of android smartphones. In 2018 USENIX Annual Technical Conference (USENIX ATC 18), pages 15--28, 2018.
[27]
Matthew Hertz, Yi Feng, and Emery D Berger. Garbage collection without paging. In Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation, pages 143--153, 2005.
[28]
Xianglong Huang, Stephen M. Blackburn, Kathryn S. McKinley, J. Eliot B. Moss, Zhenlin Wang, and Perry Cheng. The garbage collection advantage: improving program locality. In John M. Vlissides and Douglas C. Schmidt, editors, Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2004, October 24-28, 2004, Vancouver, BC, Canada, pages 69--80. ACM, 2004.
[29]
Sang-Hoon Kim, Jinkyu Jeong, and Jin-Soo Kim. Application-aware swapping for mobile systems. ACM Transactions on Embedded Computing Systems (TECS), 16(5s):1--19, 2017.
[30]
Iacovos G Kolokasis, Giannos Evdorou, Shoaib Akram, Christos Kozanitis, Anastasios Papagiannis, Foivos S Zakkak, Polyvios Pratikakis, and Angelos Bilas. Teraheap: Reducing memory pressure in managed big data frameworks. In Proceedings of the 28th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3, pages 694--709, 2023.
[31]
Sejun Kwon, Sang-Hoon Kim, Jin-Soo Kim, and Jinkyu Jeong. Managing gpu buffers for caching more apps in mobile systems. In 2015 International Conference on Embedded Software (EMSOFT), pages 207--216. IEEE, 2015.
[32]
Niel Lebeck, Arvind Krishnamurthy, Henry M Levy, and Irene Zhang. End the senseless killing: Improving memory management for mobile operating systems. In 2020 {USENIX} Annual Technical Conference ({USENIX} {ATC} 20), pages 873--887, 2020.
[33]
Changlong Li, Liang Shi, Yu Liang, and Chun Jason Xue. SEAL: user experience-aware two-level swap for mobile devices. IEEE Trans. Comput. Aided Des. Integr. Circuits Syst., 39(11):4102--4114, 2020.
[34]
Yu Liang, Jinheng Li, Rachata Ausavarungnirun, Riwei Pan, Liang Shi, Tei-Wei Kuo, and Chun Jason Xue. Acclaim: Adaptive memory reclaim to improve user experience in android systems. In 2020 {USENIX} Annual Technical Conference ({USENIX} {ATC} 20), pages 897--910, 2020.
[35]
Xinze Liu, Yubo Zhang, Ziqian Yan, and Yan Ge. Defining 'seamlessly connected': user perceptions of operation latency in cross-device interaction. International Journal of Human-Computer Studies, 177:103068, 2023.
[36]
Martin Maas, Krste Asanovic, Tim Harris, and John Kubiatowicz. Taurus: A holistic language runtime system for coordinating distributed managed-language applications. In Tom Conte and Yuanyuan Zhou, editors, Proceedings of the Twenty-First International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS 2016, Atlanta, GA, USA, April 2-6, 2016, pages 457--471. ACM, 2016.
[37]
Khanh Nguyen, Lu Fang, Guoqing Xu, Brian Demsky, Shan Lu, Sanazsadat Alamian, and Onur Mutlu. Yak: A high-performance big-data-friendly garbage collector. In 12th {USENIX} Symposium on Operating Systems Design and Implementation ({OSDI} 16), pages 349--365, 2016.
[38]
Khanh Nguyen, Kai Wang, Yingyi Bu, Lu Fang, Jianfei Hu, and Guoqing Xu. FACADE: A compiler and runtime for (almost) object-bounded big data applications. In Özcan Özturk, Kemal Ebcioglu, and Sandhya Dwarkadas, editors, Proceedings of the Twentieth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS 2015, Istanbul, Turkey, March 14-18, 2015, pages 675--690. ACM, 2015.
[39]
Vijay Janapa Reddi, Hongil Yoon, and Allan Knies. 2 billion devices and counting: An industry perspective on the state of mobile computer architecture. IEEE Micro, 38:6--21, 2018.
[40]
Thomas Shull, Jian Huang, and Josep Torrellas. Autopersist: an easy-to-use java NVM framework based on reachability. In Kathryn S. McKinley and Kathleen Fisher, editors, Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2019, Phoenix, AZ, USA, June 22-26, 2019, pages 316--332. ACM, 2019.
[41]
Sam Son, Seung Yul Lee, Yunho Jin, Jonghyun Bae, Jinkyu Jeong, Tae Jun Ham, Jae W Lee, and Hongil Yoon. {ASAP}: Fast mobile application switch via adaptive prepaging. In 2021 USENIX Annual Technical Conference (USENIX ATC 21), pages 365--380, 2021.
[42]
Darko Stefanovic, Kathryn S. McKinley, and J. Eliot B. Moss. Age-based garbage collection. In Brent Hailpern, Linda M. Northrop, and A. Michael Berman, editors, Proceedings of the 1999 ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages & Applications, OOPSLA 1999, Denver, Colorado, USA, November 1-5, 1999, pages 370--381. ACM, 1999.
[43]
Yan Tang, Qi Gao, and Feng Qin. Leaksurvivor: Towards safely tolerating memory leaks for garbage-collected languages. In Rebecca Isaacs and Yuanyuan Zhou, editors, 2008 USENIX Annual Technical Conference, Boston, MA, USA, June 22-27, 2008. Proceedings, pages 307--320. USENIX Association, 2008.
[44]
Niraj Tolia, David G Andersen, and Mahadev Satyanarayanan. Quantifying interactive user experience on thin clients. Computer, 39(3):46--52, 2006.
[45]
Po-Hsien Tseng, Pi-Cheng Hsiu, Chin-Chiang Pan, and Tei-Wei Kuo. User-centric energy-efficient scheduling on multi-core mobile devices. In The 51st Annual Design Automation Conference 2014, DAC '14, San Francisco, CA, USA, June 1-5, 2014, pages 85:1--85:6. ACM, 2014.
[46]
Chenxi Wang, Haoran Ma, Shi Liu, Yuanqi Li, Zhenyuan Ruan, Khanh Nguyen, Michael D Bond, Ravi Netravali, Miryung Kim, and Guoqing Harry Xu. Semeru: A memory-disaggregated managed runtime. In 14th {USENIX} Symposium on Operating Systems Design and Implementation ({OSDI} 20), pages 261--280, 2020.
[47]
Chenxi Wang, Haoran Ma, Shi Liu, Yifan Qiao, Jonathan Eyolfson, Christian Navasca, Shan Lu, and Guoqing Harry Xu. Memliner: Lining up tracing and application for a far-memory-friendly runtime. In Marcos K. Aguilera and Hakim Weatherspoon, editors, 16th USENIX Symposium on Operating Systems Design and Implementation, OSDI 2022, Carlsbad, CA, USA, July 11-13, 2022, pages 35--53. USENIX Association, 2022.
[48]
Johannes Weiner, Niket Agarwal, Dan Schatzberg, Leon Yang, Hao Wang, Blaise Sanouillet, Bikash Sharma, Tejun Heo, Mayank Jain, Chunqiang Tang, and Dimitrios Skarlatos. TMO: transparent memory offloading in datacenters. In Babak Falsafi, Michael Ferdman, Shan Lu, and Thomas F. Wenisch, editors, ASPLOS '22: 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Lausanne, Switzerland, 28 February 2022 - 4 March 2022, pages 609--621. ACM, 2022.
[49]
Mingyu Wu, Ziming Zhao, Haoyu Li, Heting Li, Haibo Chen, Binyu Zang, and Haibing Guan. Espresso: Brewing java for more non-volatility with non-volatile memory. In Proceedings of the Twenty-Third International Conference on Architectural Support for Programming Languages and Operating Systems, pages 70--83, 2018.
[50]
Albert Mingkun Yang, Erik Österlund, and Tobias Wrigstad. Improving program locality in the GC using hotness. In Alastair F. Donaldson and Emina Torlak, editors, Proceedings of the 41st ACM SIGPLAN International Conference on Programming Language Design and Implementation, PLDI 2020, London, UK, June 15-20, 2020, pages 301--313. ACM, 2020.
[51]
Ting Yang, Emery D Berger, Scott F Kaplan, and J Eliot B Moss. Cramm: Virtual memory support for garbage-collected applications. In Proceedings of the 7th symposium on Operating systems design and implementation, pages 103--116, 2006.
[52]
Wenyu Zhao, Stephen M. Blackburn, and Kathryn S. McKinley. Low-latency, high-throughput garbage collection. In Ranjit Jhala and Isil Dillig, editors, PLDI '22: 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, San Diego, CA, USA, June 13 - 17, 2022, pages 76--91. ACM, 2022.
[53]
Kan Zhong, Duo Liu, Liang Liang, Xiao Zhu, Linbo Long, Yi Wang, and Edwin Hsing-Mean Sha. Energy-efficient in-memory paging for smartphones. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 35(10):1577--1590, 2015.
[54]
Xiao Zhu, Duo Liu, Kan Zhong, Jinting Ren, and Tao Li. Smartswap: High-performance and user experience friendly swapping in mobile systems. In Proceedings of the 54th Annual Design Automation Conference, DAC 2017, Austin, TX, USA, June 18-22, 2017, pages 22:1--22:6. ACM, 2017.

Cited By

View all
  • (2025)MTE4JNI: A Memory Tagging Method to Protect Java Heap Memory from Illicit Native Code AccessProceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3696443.3708933(377-389)Online publication date: 1-Mar-2025

Index Terms

  1. More Apps, Faster Hot-Launch on Mobile Devices via Fore/Background-aware GC-Swap Co-design

      Recommendations

      Comments

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      ASPLOS '24: Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3
      April 2024
      1106 pages
      ISBN:9798400703867
      DOI:10.1145/3620666
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

      Sponsors

      In-Cooperation

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 27 April 2024

      Check for updates

      Badges

      Author Tags

      1. garbage collection
      2. operating systems
      3. memory management
      4. mobile systems

      Qualifiers

      • Research-article

      Funding Sources

      • Research Grants Council of the Hong Kong Special Administrative Region

      Conference

      ASPLOS '24

      Acceptance Rates

      Overall Acceptance Rate 535 of 2,713 submissions, 20%

      Upcoming Conference

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)461
      • Downloads (Last 6 weeks)48
      Reflects downloads up to 25 Feb 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2025)MTE4JNI: A Memory Tagging Method to Protect Java Heap Memory from Illicit Native Code AccessProceedings of the 23rd ACM/IEEE International Symposium on Code Generation and Optimization10.1145/3696443.3708933(377-389)Online publication date: 1-Mar-2025

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media