Abstract
Ubiquitous mobile platforms such as Android rely on managed language run-time environments, also known as language virtual machines (VMs), to run a diverse range of user applications (apps). Each app runs in its own private VM instance, and each VM makes its own private local decisions in managing its use of processor and memory resources. Moreover, the operating system and the hardware do not communicate their low-level decisions regarding power management with the high-level app environment. This lack of coordination across layers and across apps restricts more effective global use of resources on the device.
We address this problem by devising and implementing a global memory manager service for Android that optimizes memory usage, run-time performance, and power consumption globally across all apps running on the device. The service focuses on the impact of garbage collection (GC) along these dimensions, since GC poses a significant overhead within managed run-time environments. Our prototype collects system-wide statistics from all running VMs, makes centralized decisions about memory management across apps and across software layers, and also collects garbage centrally. Furthermore, the global memory manager coordinates with the power manager to tune collector scheduling. In our evaluation, we illustrate the impact of such a central memory management service in reducing total energy consumption (up to 18%) and increasing throughput (up to 12%), and improving memory utilization and adaptability to user activities.
- ACS714: Hall Effect-Based Linear Current Sensor. Allegro MicroSystems, LLC. URL http://www.pololu.com/product/1185.Google Scholar
- AndroidSVG. AndroidSVG --- SVG rendering library for Android, 2015. URL http://bigbadaboom.github.io/androidsvg.Google Scholar
- AppBrain Android market. AppTornado GmbH, 2016. URL http://www.appbrain.com/.Google Scholar
- AVG Android App performance report Q3. AVG. Now, 2015. URL http://now.avg.com/avg-android-app-performance-report-q3-2015/.Google Scholar
- N. Balasubramanian, A. Balasubramanian, and A. Venkataramani. Energy consumption in mobile phones: A measurement study and implications for network applications. In ACM SIGCOMM Conference on Internet Measurement Conference, IMC'09, pages 280--293, New York, NY, USA, 2009. ACM. ISBN 978-1-60558-771-4. doi: 10.1145/1644893.1644927. Google Scholar
Digital Library
- A. Bendersky and E. Petrank. Space overhead bounds for dynamic memory management with partial compaction. ACM Transactions on Programming Languages and Systems, 34(3):13:1--13:43, Nov. 2012. doi: 10.1145/2362389.2362392. Google Scholar
Digital Library
- S. M. Blackburn, P. Cheng, and K. S. McKinley. Myths and realities: The performance impact of garbage collection. In The Joint International Conference on Measurement and Modeling of Computer Systems, SIGMETRICS '04/Performance '04, pages 25--36, New York, NY, USA, 2004. ACM. ISBN 1-58113-873-3. doi: 10.1145/1005686.1005693. Google Scholar
Digital Library
- S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. L. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 169--190, Portland, Oregon, Oct. 2006. doi: 10.1145/1167473.1167488. Google Scholar
Digital Library
- S. Blagodurov, S. Zhuravlev, and A. Fedorova. Contention-aware scheduling on multicore systems. ACM Transactions on Computer Systems, 28(4):8:1--8:45, Dec. 2010. ISSN 0734-2071. doi: 10.1145/1880018.1880019. Google Scholar
Digital Library
- T. Brecht, E. Arjomandi, C. Li, and H. Pham. Controlling garbage collection and heap growth to reduce the execution time of java applications. ACM Transactions on Programming Languages and Systems, 28(5):908--941, Sept. 2006. doi: 10.1145/1152649.1152652. Google Scholar
Digital Library
- D. Brodowski. CPU frequency and voltage scaling code in the Linux kernel. URL https://www.kernel.org/doc/Documentation/cpu-freq/governors.txt.Google Scholar
- N. Brouwers, M. Zuniga, and K. Langendoen. Neat: A novel energy analysis toolkit for free-roaming smartphones. In ACM Conference on Embedded Network Sensor Systems, SenSys'14, pages 16--30, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-3143-2. doi: 10.1145/2668332.2668337. Google Scholar
Digital Library
- C. Cameron, J. Singer, and D. Vengerov. The judgment of Forseti: Economic utility for dynamic heap sizing of multiple runtimes. In ACM SIGPLAN International Symposium on Memory Management, pages 143--156, Portland, Oregon, June 2015. doi: 10.1145/2754169.2754180. Google Scholar
Digital Library
- T. Cao, S. M. Blackburn, T. Gao, and K. S. McKinley. The yin and yang of power and performance for asymmetric hardware and managed software. In International Symposium on Computer Architecture, pages 225--236, Portland, Oregon, June 2012. doi: 10.1109/ISCA.2012.6237020. Google Scholar
Cross Ref
- A. Carroll and G. Heiser. Unifying DVFS and offlining in mobile multicores. In IEEE Real-Time and Embedded Technology and Applications Symposium, pages 287--296, Berlin, Germany, Apr. 2014. doi: 10.1109/RTAS.2014.6926010. Google Scholar
Cross Ref
- G. Chen, M. T. Kandemir, N. Vijaykrishnan, M. J. Irwin, and M. Wolczko. Adaptive garbage collection for battery-operated environments. In USENIX Java Virtual Machine Research and Technology Symposium, pages 1--12, San Francisco, California, Aug. 2002. URL https://www.usenix.org/legacy/event/jvm02/chen_g.html.Google Scholar
Digital Library
- G. Chen, R. Shetty, M. Kandemir, N. Vijaykrishnan, M. J. Irwin, and M. Wolczko. Tuning garbage collection for reducing memory system energy in an embedded Java environment. ACM Transactions on Embedded Computing Systems, 1(1):27--55, Nov. 2002. doi: 10.1145/581888.581892. Google Scholar
Digital Library
- X. Chen, A. Jindal, N. Ding, Y. C. Hu, M. Gupta, and R. Vannithamby. Smartphone background activities in the wild: Origin, energy drain, and optimization. In International Conference on Mobile Computing and Networking, MobiCom'15, pages 40--52, New York, NY, USA, 2015. ACM. ISBN 978-1-4503-3619-2. doi: 10.1145/2789168.2790107. Google Scholar
Digital Library
- C. J. Cheney. A nonrecursive list compacting algorithm. Commun. ACM, 13(11):677--678, Nov. 1970. doi: 10.1145/362790.362798. Google Scholar
Digital Library
- P. Cheng and G. E. Blelloch. A parallel, real-time garbage collector. In ACM SIGPLAN International Conference on Programming Language Design and Implementation, pages 125--136, Snowbird, Utah, June 2001. doi: 10.1145/378795.378823. Google Scholar
Digital Library
- G. Czajkowski and L. Daynés. Multitasking without compromise: A virtual machine evolution. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 125--138, Tampa, Florida, 2001. doi: 10.1145/504282.504292. Google Scholar
Digital Library
- F. M. David, J. C. Carlyle, and R. H. Campbell. Context switch overheads for Linux on ARM platforms. In Workshop on Experimental Computer Science, ExpCS'07, San Diego, California, 2007. doi: 10.1145/1281700.1281703. Google Scholar
Digital Library
- U. Degenbaev, J. Eisinger, M. Ernst, R. McIlroy, and H. Payer. Idle time garbage collection scheduling. In ACM SIGPLAN International Conference on Programming Language Design and Implementation, pages 570--583, San Jose, California, 2016. ISBN 978-1-4503-4261-2. doi: 10.1145/2908080.2908106. Google Scholar
Digital Library
- R. Efron. Conservation of temporal information by perceptual systems. Perception & Psychophysics, 14(3): 518--530, Oct. 1973. doi: 10.3758/BF03211193. Google Scholar
Cross Ref
- Taming the OOM killer. Eklektix, Inc., 2009. URL http://lwn.net/Articles/317814/.Google Scholar
- H. Franke and R. Russell. Fuss, futexes and furwocks: Fast userlevel locking in Linux. In Ottawa Linux Symposium, pages 479--495, Ottawa, Canada, June 2002. URL http://www.kernel.org/doc/ols/2002/ols2002-pages-479-495.pdf.Google Scholar
- AOSP issue tracker, 98332: Low memory killer is extremely aggressive. Google Inc., 2015. URL https://code.google.com/p/android/issues/detail?id=98332.Google Scholar
- Android ART and Dalvik. Google Inc., 2015. URL https://source.android.com/devices/tech/dalvik/art.html.Google Scholar
- monkeyrunner API. Google Inc., 2015. URL http://developer.android.com/tools/help/monkeyrunner_concepts.html.Google Scholar
- Android Processes and Threads. Google Inc., 2016. URL https://developer.android.com/guide/components/processes-and-threads.html.Google Scholar
- Android Open Source Project. Google Inc., 2016. URL http://source.android.com.Google Scholar
- P. Griffin, W. Srisa-an, and J. M. Chang. An energy efficient garbage collector for Java embedded devices. In ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems, pages 230--238, Chicago, Illinois, June 2005. doi: 10.1145/1065910.1065943. Google Scholar
Digital Library
- X. Guan, W. Srisa-an, and C. Jia. Investigating the effects of using different nursery sizing policies on performance. In ACM SIGPLAN International Symposium on Memory Management, ISMM'09, pages 59--68, New York, NY, USA, 2009. ACM. ISBN 978-1-60558-347-1. doi: 10.1145/1542431.1542441. Google Scholar
Digital Library
- A. Hussein, A. L. Hosking, M. Payer, and C. A. Vick. Don't race the memory bus: Taming the GC leadfoot. In ACM SIGPLAN International Symposium on Memory Management, pages 15--27, Portland, Oregon, 2015. doi: 10.1145/2754169.2754182. Google Scholar
Digital Library
- A. Iyer and D. Marculescu. Power efficiency of voltage scaling in multiple clock, multiple voltage cores. In IEEE/ACM International Conference on Computer-Aided Design, pages 379--386, San Jose, California, Nov. 2002. doi: 10.1145/774572.774629. Google Scholar
Digital Library
- N. Jacek, M.-C. Chiu, B. Marlin, and E. Moss. Assessing the limits of program-specific garbage collection performance. In ACM SIGPLAN International Conference on Programming Language Design and Implementation, pages 584--598, Santa Barbara, California, June 2016. doi: 10.1145/2908080.2908120. Google Scholar
Digital Library
- M. R. Jantz, F. J. Robinson, P. A. Kulkarni, and K. A. Doshi. Cross-layer memory management for managed language applications. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 488--504, Pittsburgh, Pennsylvania, Oct. 2015. doi: 10.1145/2814270.2814322. Google Scholar
Digital Library
- JSR 121: Application Isolation API Specification. Java Community Process. URL https://jcp.org/en/jsr/detail?id=121.Google Scholar
- R. Jones, A. Hosking, and E. Moss. The Garbage Collection Handbook: The Art of Automatic Memory Management. Chapman & Hall/CRC Press, 2011. Google Scholar
Cross Ref
- M. Kambadur and M. A. Kim. An experimental survey of energy management across the stack. In ACM SIGPLAN International Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 329--344, Portland, Oregon, Oct. 2014. doi: 10.1145/2660193.2660196. Google Scholar
Digital Library
- S.-H. Kim, S. Kwon, J.-S. Kim, and J. Jeong. Controlling physical memory fragmentation in mobile systems. In ACM SIGPLAN International Symposium on Memory Management, pages 1--14, Portland, Oregon, June 2015. doi: 10.1145/2754169.2754179. Google Scholar
Digital Library
- P. Lengauer and H. Mössenböck. The taming of the shrew: Increasing performance by automatic parameter tuning for Java garbage collectors. In ACM/SPEC International Conference on Performance Engineering, pages 111--122, Dublin, Ireland, 2014. ISBN 978-1-4503-2733-6. doi: 10.1145/2568088.2568091. Google Scholar
Digital Library
- C. Li, C. Ding, and K. Shen. Quantifying the cost of context switch. In Workshop on Experimental Computer Science, ExpCS'07, San Diego, California, 2007. doi: 10.1145/1281700.1281702. Google Scholar
Digital Library
- H. Lieberman and C. E. Hewitt. A real-time garbage collector based on the lifetimes of objects. Commun. ACM, 26(6):419--429, June 1983. doi: 10.1145/358141.358147. Google Scholar
Digital Library
- M. Maas, K. Asanović, T. Harris, and J. Kubiatowicz. Taurus: A holistic language runtime system for coordinating distributed managed-language applications. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 457--471, Atlanta, Georgia, Apr. 2016. doi: 10.1145/2872362.2872386. Google Scholar
Digital Library
- A. Miyoshi, C. Lefurgy, E. Van Hensbergen, R. Rajamony, and R. Rajkumar. Critical power slope: Understanding the runtime effects of frequency scaling. In International Conference on Supercomputing, pages 35--44, New York, New York, June 2002. doi: 10.1145/514191.514200. Google Scholar
Digital Library
- Monsoon Power Monitors. Monsoon Solutions Inc., 2016. URL https://www.msoon.com/LabEquipment/PowerMonitor/.Google Scholar
- NI. NI USB-6008/6009 user guide and specifications, Feb. 2012. URL http://www.ni.com/pdf/manuals/371303m.pdf.Google Scholar
- A. Pathak, Y. C. Hu, M. Zhang, P. Bahl, and Y.-M. Wang. Fine-grained power modeling for smartphones using system call tracing. In ACM European Conference on Computer Systems, pages 153--168, Salzburg, Austria, Apr. 2011. doi: 10.1145/1966445.1966460. Google Scholar
Digital Library
- A. Pathak, Y. C. Hu, and M. Zhang. Where is the energy spent inside my app?: Fine grained energy accounting on smartphones with eprof. In ACM European Conference on Computer Systems, pages 29--42, Bern, Switzerland, Apr. 2012. doi: 10.1145/2168836.2168841. Google Scholar
Digital Library
- T. Printezis. On measuring garbage collection responsiveness. Science of Computer Programming, 62(2): 164--183, Oct. 2006. doi: 10.1016/j.scico.2006.02.004. Google Scholar
Digital Library
- J. M. Robson. Worst case fragmentation of first fit and best fit storage allocation strategies. The Computer Journal, 20 (3):242--244, Aug. 1977. Google Scholar
Cross Ref
- J. B. Sartor and L. Eeckhout. Exploring multi-threaded Java application performance on multicore hardware. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 281--296, Tucson, Arizona, Oct. 2012. doi: 10.1145/2384616.2384638. Google Scholar
Digital Library
- A. Schulman, T. Schmid, P. Dutta, and N. Spring. Demo: Phone Power Monitoring with Battor, 2011. URL http://www.cs.umd.edu/~schulman/battor.html.Google Scholar
- J. Singer, G. Brown, I. Watson, and J. Cavazos. Intelligent selection of application-specific garbage collectors. In ACM SIGPLAN International Symposium on Memory Management, pages 91--102, Montréal, Canada, Oct. 2007. doi: 10.1145/1296907.1296920. Google Scholar
Digital Library
- D. M. Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. In ACM SIGSOFT/SIGPLAN Software Engineering Symposium on Practical Software Development Environments, pages 157--167, Pittsburgh, Pennsylvania, Apr. 1984. doi: 10.1145/800020.808261. Google Scholar
Digital Library
- D. R. White, J. Singer, J. M. Aitken, and R. E. Jones. Control theory for principled heap sizing. In ACM SIGPLAN International Symposium on Memory Management, pages 27--38, Seattle, Washington, June 2013. doi: 10.1145/2464157.2466481.Google Scholar
Digital Library
- R. Wilhelm, J. Engblom, A. Ermedahl, N. Holsti, S. Thesing, D. Whalley, G. Bernat, C. Ferdinand, R. Heckmann, T. Mitra, F. Mueller, I. Puaut, P. Puschner, J. Staschulat, and P. Stenström. The worst-case execution-time problem --- overview of methods and survey of tools. ACM Transactions on Embedded Computing Systems, 7(3):36:1--36:53, May 2008. doi: 10.1145/1347375.1347389. Google Scholar
Digital Library
- F. Xian, W. Srisa-an, and H. Jiang. Contention-aware scheduler: Unlocking execution parallelism in multithreaded Java programs. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, OOPSLA'08, pages 163--180, New York, NY, USA, 2008. ACM. ISBN 978-1-60558-215-3. doi: 10.1145/1449764.1449778. Google Scholar
Digital Library
- Y. Yan, C. Chen, K. Dantu, S. Y. Ko, and L. Ziarek. Using a multi-tasking VM for mobile applications. In International Workshop on Mobile Computing Systems and Applications, HotMobile'16, pages 93--98, St. Augustine, Florida, Feb. 2016. doi: 10.1145/2873587.2873596. Google Scholar
Digital Library
- L. Zhang, B. Tiwana, Z. Qian, Z. Wang, R. P. Dick, Z. M. Mao, and L. Yang. Accurate online power estimation and automatic battery behavior based power model generation for smartphones. In IEEE/ACM/IFIP international Conference on Hardware/Software Codesign and System Synthesis, CODES/ISSS'10, pages 105--114, New York, NY, USA, 2010. ACM. ISBN 978-1-60558-905-3. doi: 10.1145/1878961.1878982. Google Scholar
Digital Library
Index Terms
One Process to Reap Them All: Garbage Collection as-a-Service
Recommendations
Impact of GC design on power and performance for Android
SYSTOR '15: Proceedings of the 8th ACM International Systems and Storage ConferenceSmall mobile devices have evolved to versatile computing systems. Android devices run a complete software stack, including a full Linux kernel, user land with several software daemons and a virtual machine to run applications. On these mobile systems ...
One Process to Reap Them All: Garbage Collection as-a-Service
VEE '17: Proceedings of the 13th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution EnvironmentsUbiquitous mobile platforms such as Android rely on managed language run-time environments, also known as language virtual machines (VMs), to run a diverse range of user applications (apps). Each app runs in its own private VM instance, and each VM ...
Don't race the memory bus: taming the GC leadfoot
ISMM '15: Proceedings of the 2015 International Symposium on Memory ManagementDynamic voltage and frequency scaling (DVFS) is ubiquitous on mobile devices as a mechanism for saving energy. Reducing the clock frequency of a processor allows a corresponding reduction in power consumption, as does turning off idle cores. Garbage ...







Comments