Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3652024.3665510acmconferencesArticle/Chapter ViewAbstractPublication PagesismmConference Proceedingsconference-collections
research-article
Open access

Memory Management on Mobile Devices

Published: 20 June 2024 Publication History

Abstract

The performance of mobile devices directly affects billions of people worldwide. Yet, despite memory management being key to their responsiveness, energy efficiency, and cost, mobile devices are understudied in the literature. A paucity of suitable methodologies and benchmarks is likely both a cause and a consequence of this gap. It also reflects the challenges of evaluating mobile devices due to: i) their inherently multi-tenanted nature, ii) the scarcity of widely-used open source workloads suitable as benchmarks, iii) the challenge of determinism and reproducibility given mobile devices' extensive use of GPS and network services, iv) the complexity of mobile performance criteria.
We study this problem using the Android Runtime (ART), which is particularly interesting because it is open sourced, garbage collected, and its market extends from the most advanced to the most basic mobile devices available, with a commensurate diversity of performance expectations. Our study makes the following contributions: i) we identify pitfalls and challenges to the sound evaluation of garbage collection in ART, ii) we describe a framework for the principled performance evaluation of overheads in ART, iii) we curate a small benchmark suite comprised of widely-used real-world applications, and iv) we conduct an evaluation of these real-world workloads as well as some DaCapo benchmarks and a micro-benchmark. For a modestly sized heap, we find that the lower bound on garbage collection overheads vary considerably among the benchmarks we evaluate, from 2 % to 51 %, and that overall, overheads are similar to those identified in recent studies of Java workloads running on OpenJDK. We hope that this work will demystify the challenges of studying memory management in the Android Runtime. By doing so, we hope to open up research and lead to more innovation in this highly impactful and memory-sensitive domain.

References

[1]
Mohammad A. Alkandari, Ali Kelkawi, and Mahmoud O. Elish. 2021. An Empirical Investigation on the Effect of Code Smells on Resource Usage of Android Mobile Applications. IEEE Access, 9 (2021), 61853–61863. https://doi.org/10.1109/ACCESS.2021.3075040
[2]
Android Open Source Project. 2023. Get started with game development in Unity. https://developer.android.com/games/engines/unity/start-in-unity Archived at
[3]
Android Open Source Project. 2023. dumpsys. https://developer.android.com/tools/dumpsys Archived at
[4]
Android Open Source Project. 2024. Android 8.0 ART improvements. https://source.android.com/docs/core/runtime/improvements Archived at
[5]
Android Open Source Project. 2024. Android Jetpack. https://android.googlesource.com/platform/frameworks/support/
[6]
Android Open Source Project. 2024. ART Chroot-Based On-Device Testing. https://android.googlesource.com/platform/art/+/5937cdeeef4639e523ae3cfde3bfce3ccb252921/test/README.chroot.md
[7]
Android Open Source Project. 2024. ART TI. https://source.android.com/docs/core/runtime/art-ti Archived at
[8]
Android Open Source Project. 2024. Baseline Profiles overview. https://developer.android.com/topic/performance/baselineprofiles/overview Archived at
[9]
Android Open Source Project. 2024. Dalvik executable format. https://source.android.com/docs/core/runtime/dex-format Archived at
[10]
Android Open Source Project. 2024. Espresso. https://developer.android.com/training/testing/espresso Archived at
[11]
Android Open Source Project. 2024. Implement ART just-in-time compiler. https://source.android.com/docs/core/runtime/jit-compiler Archived at
[12]
Android Open Source Project. 2024. Low Memory Killer Daemon. https://source.android.com/docs/core/perf/lmkd Archived at
[13]
Android Open Source Project. 2024. Memory allocation among processes. https://developer.android.com/topic/performance/memory-management Archived at
[14]
Android Open Source Project. 2024. Network security configuration. https://developer.android.com/privacy-and-security/security-config Archived at
[15]
Android Open Source Project. 2024. Overview of measuring app performance. https://developer.android.com/topic/performance/measuring-performance Archived at
[16]
Android Open Source Project. 2024. Overview of memory management. https://developer.android.com/topic/performance/memory-overview Archived at
[17]
Android Open Source Project. 2024. Security with network protocols. https://developer.android.com/privacy-and-security/security-ssl Archived at
[18]
Android Open Source Project. 2024. Write automated tests with UI Automator. https://developer.android.com/training/testing/other-components/ui-automator Archived at
[19]
AnTuTu. 2021. AnTuTu Benchmark. https://www.antutu.com/en/index.htm
[20]
Stephen M. Blackburn, Robin Garner, Chris Hoffmann, Asjad M. Khan, Kathryn S. McKinley, Rotem Bentzur, Amer Diwan, Daniel Feinberg, Daniel Frampton, Samuel Z. Guyer, Martin Hirzel, Antony L. Hosking, Maria Jump, Han Bok Lee, J. Eliot B. Moss, Aashish Phansalkar, Darko Stefanovic, Thomas VanDrunen, Daniel von Dincklage, and Ben Wiedermann. 2006. The DaCapo benchmarks: Java benchmarking development and analysis. In Proceedings of the 21th Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2006, October 22-26, 2006, Portland, Oregon, USA, Peri L. Tarr and William R. Cook (Eds.). ACM, 169–190. https://doi.org/10.1145/1167473.1167488
[21]
Stephen M. Blackburn, Kathryn S. McKinley, Robin Garner, Chris Hoffmann, Asjad M. Khan, Rotem Bentzur, Amer Diwan, Daniel Feinberg, Daniel Frampton, Samuel Z. Guyer, Martin Hirzel, Antony L. Hosking, Maria Jump, Han Lee, J. Eliot B. Moss, Aashish Phansalkar, Darko Stefanovic, Thomas VanDrunen, Daniel von Dincklage, and Ben Wiedermann. 2008. Wake up and smell the coffee: evaluation methodology for the 21st century. Commun. ACM, 51, 8 (2008), 83–89. https://doi.org/10.1145/1378704.1378723
[22]
Zixian Cai, Stephen M. Blackburn, Michael D. Bond, and Martin Maas. 2022. Distilling the Real Cost of Production Garbage Collectors. In International IEEE Symposium on Performance Analysis of Systems and Software, ISPASS 2022, Singapore, May 22-24, 2022. IEEE, 46–57. https://doi.org/10.1109/ISPASS55109.2022.00005
[23]
Laura Ceci. 2023. Leading Android app categories worldwide 2019. https://www.statista.com/statistics/200855/favourite-smartphone-app-categories-by-share-of-smartphone-users/
[24]
Laura Ceci. 2024. Most popular smartphone activities for global users 2022-2023. https://www.statista.com/statistics/1337895/top-smartphone-activities/
[25]
Seang Chau. 2022. Android 13 is in AOSP!. https://android-developers.googleblog.com/2022/08/android-13-is-in-aosp.html
[26]
Aldo Cortesi, Maximilian Hils, Thomas Kriechbaumer, and contributors. 2010–. mitmproxy: A free and open source interactive HTTPS proxy. https://mitmproxy.org/ [Version 10.3]
[27]
Luis Cruz and Rui Abreu. 2017. Performance-Based Guidelines for Energy Efficient Mobile Applications. In 4th IEEE/ACM International Conference on Mobile Software Engineering and Systems, MOBILESoft@ICSE 2017, Buenos Aires, Argentina, May 22-23, 2017. IEEE, 46–57. https://doi.org/10.1109/MOBILESoft.2017.19
[28]
DaCapo Developers. 2023. The DaCapo Benchmark Suite. https://github.com/dacapobench/dacapobench/releases/tag/v23.11-chopin
[29]
Teerath Das, Massimiliano Di Penta, and Ivano Malavolta. 2020. Characterizing the evolution of statically-detectable performance issues of Android apps. Empir. Softw. Eng., 25, 4 (2020), 2748–2808. https://doi.org/10.1007/S10664-019-09798-3
[30]
John Ellis, Pete Kovac, Hans-J. Boehm, and Will Clinger. 1997. An Artificial Garbage Collection Benchmark. https://hboehm.info/gc/gc_bench.html
[31]
Ruitao Feng, Guozhu Meng, Xiaofei Xie, Ting Su, Yang Liu, and Shang-Wei Lin. 2019. Learning Performance Optimization from Code Changes for Android Apps. In 2019 IEEE International Conference on Software Testing, Verification and Validation Workshops, ICST Workshops 2019, Xi’an, China, April 22-23, 2019. IEEE, 285–290. https://doi.org/10.1109/ICSTW.2019.00067
[32]
Andy Georges, Dries Buytaert, and Lieven Eeckhout. 2007. Statistically rigorous java performance evaluation. In Proceedings of the 22nd Annual ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA 2007, October 21-25, 2007, Montreal, Quebec, Canada, Richard P. Gabriel, David F. Bacon, Cristina Videira Lopes, and Guy L. Steele Jr. (Eds.). ACM, 57–76. https://doi.org/10.1145/1297027.1297033
[33]
Lokesh Gidra, Hans-J. Boehm, and Joel Fernandes. 2020. Utilizing the Linux Userfaultfd System Call in a Compaction Phase of a Garbage Collection Process. Google LLC. https://www.tdcommons.org/cgi/viewcontent.cgi?article=4751&context=dpubs_series
[34]
Monika Gupta. 2021. Google Tensor is a milestone for machine learning. https://blog.google/products/pixel/introducing-google-tensor/
[35]
Sangwook Shane Hahn, Sungjin Lee, Inhyuk Yee, Donguk Ryu, and Jihong Kim. 2017. Improving User Experience of Android Smartphones Using Foreground App-Aware I/O Management. In Proceedings of the 8th Asia-Pacific Workshop on Systems, Mumbai, India, September 2, 2017. ACM, 5:1–5:8. https://doi.org/10.1145/3124680.3124721
[36]
Geoffrey Hecht, Naouel Moha, and Romain Rouvoy. 2016. An empirical study of the performance impacts of Android code smells. In Proceedings of the International Conference on Mobile Software Engineering and Systems, MOBILESoft ’16, Austin, Texas, USA, May 14-22, 2016. ACM, 59–69. https://doi.org/10.1145/2897073.2897100
[37]
Matthew Hertz, Yi Feng, and Emery D. Berger. 2005. Garbage collection without paging. In Proceedings of the ACM SIGPLAN 2005 Conference on Programming Language Design and Implementation, Chicago, IL, USA, June 12-15, 2005, Vivek Sarkar and Mary W. Hall (Eds.). ACM, 143–153. https://doi.org/10.1145/1065010.1065028
[38]
Jiacheng Huang, Yunmo Zhang, Junqiao Qiu, Yu Liang, Rachata Ausavarungnirun, Qingan Li, and Chun Jason Xue. 2024. More Apps, Faster Hot-Launch on Mobile Devices via Fore/Background-aware GC-Swap Co-design. In Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 3, ASPLOS 2024, La Jolla, CA, USA, 27 April 2024- 1 May 2024, Rajiv Gupta, Nael B. Abu-Ghazaleh, Madan Musuvathi, and Dan Tsafrir (Eds.). ACM, 654–670. https://doi.org/10.1145/3620666.3651377
[39]
Xianglong Huang, Stephen M. Blackburn, Kathryn S. McKinley, J. Eliot B. Moss, Zhenlin Wang, and Perry Cheng. 2004. The garbage collection advantage: improving program locality. In 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, John M. Vlissides and Douglas C. Schmidt (Eds.). ACM, 69–80. https://doi.org/10.1145/1028976.1028983
[40]
Ahmed Hussein, Mathias Payer, Antony L. Hosking, and Christopher A. Vick. 2015. Impact of GC design on power and performance for Android. In Proceedings of the 8th ACM International Systems and Storage Conference, SYSTOR 2015, Haifa, Israel, May 26-28, 2015, Dalit Naor, Gernot Heiser, and Idit Keidar (Eds.). ACM, 13:1–13:12. https://doi.org/10.1145/2757667.2757674
[41]
Ahmed Hussein, Mathias Payer, Antony L. Hosking, and Christopher A. Vick. 2017. Android Etalon – DaCapo. https://github.com/fizous/etalondacapo
[42]
Ahmed Hussein, Mathias Payer, Antony L. Hosking, and Christopher A. Vick. 2017. One Process to Reap Them All: Garbage Collection as-a-Service. In Proceedings of the 13th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments, VEE 2017, Xi’an, China, April 8-9, 2017. ACM, 171–186. https://doi.org/10.1145/3050748.3050754
[43]
Sangoh Park Jaehwan Lee. 2021. Mobile Memory Management System Based on User’s Application Usage Patterns. Computers, Materials & Continua, 68, 3 (2021), 4031–4050. issn:1546-2226 https://doi.org/10.32604/cmc.2021.017872
[44]
Nolen Johnson. 2024. Changelog 28 - Fantastic Fourteen, Amazing Applications, Undeniable User-Experience. https://lineageos.org/Changelog-28/
[45]
Henry G. Baker Jr. 1978. List Processing in Real Time on a Serial Computer. Commun. ACM, 21, 4 (1978), 280–294. https://doi.org/10.1145/359460.359470
[46]
Haim Kermany and Erez Petrank. 2006. The Compressor: concurrent, incremental, and parallel compaction. In Proceedings of the ACM SIGPLAN 2006 Conference on Programming Language Design and Implementation, Ottawa, Ontario, Canada, June 11-14, 2006, Michael I. Schwartzbach and Thomas Ball (Eds.). ACM, 354–363. https://doi.org/10.1145/1133981.1134023
[47]
Sang-Hoon Kim, Jinkyu Jeong, and Jin-Soo Kim. 2017. Application-Aware Swapping for Mobile Systems. ACM Trans. Embed. Comput. Syst., 16, 5s (2017), 182:1–182:19. https://doi.org/10.1145/3126509
[48]
Sang-Hoon Kim, Jinkyu Jeong, Jin-Soo Kim, and Seungryoul Maeng. 2016. SmartLMK: A Memory Reclamation Scheme for Improving User-Perceived App Launch Time. ACM Trans. Embed. Comput. Syst., 15, 3 (2016), 47:1–47:25. https://doi.org/10.1145/2894755
[49]
Federica Laricchia. 2023. Number of mobile devices worldwide 2020-2025. https://www.statista.com/statistics/245501/multiple-mobile-device-ownership-worldwide
[50]
Niel Lebeck, Arvind Krishnamurthy, Henry M. Levy, and Irene Zhang. 2020. End the Senseless Killing: Improving Memory Management for Mobile Operating Systems. In 2020 USENIX Annual Technical Conference, USENIX ATC 2020, July 15-17, 2020, Ada Gavrilovska and Erez Zadok (Eds.). USENIX Association, 873–887. https://www.usenix.org/conference/atc20/presentation/lebeck
[51]
Cong Li, Jia Bao, and Haitao Wang. 2017. Optimizing low memory killers for mobile devices using reinforcement learning. In 13th International Wireless Communications and Mobile Computing Conference, IWCMC 2017, Valencia, Spain, June 26-30, 2017. IEEE, 2169–2174. https://doi.org/10.1109/IWCMC.2017.7986619
[52]
Changlong Li, Yu Liang, Rachata Ausavarungnirun, Zongwei Zhu, Liang Shi, and Chun Jason Xue. 2023. ICE: Collaborating Memory and Process Management for User Experience on Resource-limited Mobile Devices. In Proceedings of the Eighteenth European Conference on Computer Systems, EuroSys 2023, Rome, Italy, May 8-12, 2023, Giuseppe Antonio Di Luna, Leonardo Querzoni, Alexandra Fedorova, and Dushyanth Narayanan (Eds.). ACM, 79–93. https://doi.org/10.1145/3552326.3567497
[53]
Yu Liang, Jinheng Li, Rachata Ausavarungnirun, Riwei Pan, Liang Shi, Tei-Wei Kuo, and Chun Jason Xue. 2020. Acclaim: Adaptive Memory Reclaim to Improve User Experience in Android Systems. In 2020 USENIX Annual Technical Conference, USENIX ATC 2020, July 15-17, 2020, Ada Gavrilovska and Erez Zadok (Eds.). USENIX Association, 897–910. https://www.usenix.org/conference/atc20/presentation/liang-yu
[54]
Felipe Lima. 2017. Writing fast, deterministic and accurate Android Integration tests. https://medium.com/airbnb-engineering/writing-fast-deterministic-and-accurate-android-integration-tests-c56811bd14e2
[55]
Rodrigo Morales, Rubén Saborido, Foutse Khomh, Francisco Chicano, and Giuliano Antoniol. 2018. EARMO: An Energy-Aware Refactoring Approach for Mobile Apps. IEEE Trans. Software Eng., 44, 12 (2018), 1176–1206. https://doi.org/10.1109/TSE.2017.2757486
[56]
Okta. 2023. What Is a Cryptographic Nonce? Definition & Meaning. https://www.okta.com/au/identity-101/nonce/
[57]
PassMark Software. 2021. PassMark PerformanceTest Mobile. https://www.passmark.com/products/pt_mobile/
[58]
Primate Labs Inc. 2023. Geekbench 6 – Cross-Platform Benchmark. https://www.geekbench.com
[59]
Aleksandar Prokopec, Andrea Rosà, David Leopoldseder, Gilles Duboscq, Petr Tuma, Martin Studener, Lubomír Bulej, Yudi Zheng, Alex Villazón, Doug Simon, Thomas Würthinger, and Walter Binder. 2019. Renaissance: benchmarking suite for parallel applications on the JVM. In Proceedings of the 40th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI 2019, Phoenix, AZ, USA, June 22-26, 2019, Kathryn S. McKinley and Kathleen Fisher (Eds.). ACM, 31–47. https://doi.org/10.1145/3314221.3314637
[60]
Onur Sahin, Assel Aliyeva, Hariharan Mathavan, Ayse K. Coskun, and Manuel Egele. 2019. RANDR: Record and Replay for Android Applications via Targeted Runtime Instrumentation. In 34th IEEE/ACM International Conference on Automated Software Engineering, ASE 2019, San Diego, CA, USA, November 11-15, 2019. IEEE, 128–138. https://doi.org/10.1109/ASE.2019.00022
[61]
Ahmed Sherif. 2024. Market share of mobile operating systems worldwide from 2009 to 2023, by quarter. https://www.statista.com/statistics/272698/global-market-share-held-by-mobile-operating-systems-since-2009/
[62]
Atikant Singh, Aakriti V Agrawal, and Anuradha Kanukotla. 2016. A method to improve application launch performance in Android devices. In 2016 International Conference on Internet of Things and Applications (IOTA). 112–115. https://doi.org/10.1109/IOTA.2016.7562705
[63]
SPEC Standard Performance Evaluation Corporation. 2015. The SPECjbb 2015 benchmark. https://www.spec.org/jbb2015/
[64]
SPEC Standard Performance Evaluation Corporation. 2015. The SPECjvm 2008 benchmark. https://www.spec.org/jvm2008/
[65]
The LineageOS Project. 2024. LineageOS Android Distribution. https://lineageos.org
[66]
UL Solutions. 2021. PCMark Android Benchmark. https://benchmarks.ul.com/pcmark-android
[67]
UL Solutions. 2023. 3DMark Android Benchmark. https://benchmarks.ul.com/3dmark-android
[68]
Unity Technologies. 2024. Unity Real-Time Development Platform | 3D, 2D, VR & AR Engine. https://unity.com/
[69]
Yong-Xuan Wang, Chung-Hsuan Tsai, and Li-Pin Chang. 2021. Killing Processes or Killing Flash? Escaping from the Dilemma Using Lightweight, Compression-Aware Swap for Mobile Devices. ACM Trans. Embed. Comput. Syst., 20, 5s (2021), 90:1–90:24. https://doi.org/10.1145/3477021
[70]
Wikipedia Contributors. 2024. Replay Attack. https://en.wikipedia.org/wiki/Replay_attack Archived at
[71]
Wenyu Zhao, Stephen M. Blackburn, and Kathryn S. McKinley. 2022. Low-latency, high-throughput garbage collection. In PLDI ’22: 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation, San Diego, CA, USA, June 13 - 17, 2022, Ranjit Jhala and Isil Dillig (Eds.). ACM, 76–91. https://doi.org/10.1145/3519939.3523440

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
ISMM 2024: Proceedings of the 2024 ACM SIGPLAN International Symposium on Memory Management
June 2024
141 pages
ISBN:9798400706158
DOI:10.1145/3652024
This work is licensed under a Creative Commons Attribution International 4.0 License.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 20 June 2024

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Android
  2. Android Runtime
  3. Garbage Collection
  4. Memory Management

Qualifiers

  • Research-article

Funding Sources

  • Australian Research Council

Conference

ISMM '24
Sponsor:

Acceptance Rates

Overall Acceptance Rate 72 of 156 submissions, 46%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 394
    Total Downloads
  • Downloads (Last 12 months)394
  • Downloads (Last 6 weeks)158
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media