skip to main content
research-article

Don't race the memory bus: taming the GC leadfoot

Published:14 June 2015Publication History
Skip Abstract Section

Abstract

Dynamic 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 collection is a canonical example of the sort of memory-bound workload that best responds to such scaling. Here, we explore the impact of frequency scaling for garbage collection in a real mobile device running Android's Dalvik virtual machine, which uses a concurrent collector. By controlling the frequency of the core on which the concurrent collector thread runs we can reduce power significantly. Running established multi-threaded benchmarks shows that total processor energy can be reduced up to 30%, with end-to-end performance loss of at most 10%.

References

  1. Allegro MicroSystems, LLC. ACS714: Automotive grade, fully integrated, Hall effect-based linear current sensor IC with 2.1 kVRMS voltage isolation and a low-resistance current conductor. URL http://www.pololu.com/product/1185.Google ScholarGoogle Scholar
  2. A. Anantaraman, K. Seth, K. Patil, E. Rotenberg, and F. Mueller. Virtual simple architecture (VISA): exceeding the complexity limit in safe real-time systems. In International Symposium on Computer Architecture, pages 350–361, June 2003. doi: 10.1109/ISCA.2003.1207013. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Android. URL http://source.android.com.Google ScholarGoogle Scholar
  4. Android Performance Tips. URL http://developer. android.com/training/articles/perf-tips.html.Google ScholarGoogle Scholar
  5. M. Arnold, S. Fink, D. Grove, M. Hind, and P. F. Sweeney. Adaptive optimization in the jalapeño JVM. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 47–65, Minneapolis, Minnesota, Oct. 2000. doi: 10.1145/353171.353175. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. ART and Dalvik. URL https://source.android.com/ devices/tech/dalvik/art.html.Google ScholarGoogle Scholar
  7. I. Assayad, A. Girault, and H. Kalla. Tradeoff exploration between reliability, power consumption, and execution time. In International Conference on Computer Safety, Reliability, and Security, pages 437–451, Naples, Italy, 2011. doi: 10.1007/ 978-3-642-24270-0_32. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. D. F. Bacon, P. Cheng, and S. Shukla. And then there were none: a stall-free real-time garbage collector for reconfigurable hardware. In ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 23–34, Beijing, China, June 2012. doi: 10.1145/2254064.2254068. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. D. F. Bacon, P. Cheng, and S. Shukla. And then there were none: a stall-free real-time garbage collector for reconfigurable hardware. Commun. ACM, 56(12):101–109, Jan. 2013. doi: 10. 1145/2534706.2534726. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. D. F. Bacon, P. Cheng, and S. Shukla. Parallel real-time garbage collection of multiple heaps in reconfigurable hardware. In ACM SIGPLAN International Symposium on Memory Management, pages 117–127, Edinburgh, Scotland, June 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. doi: 10.1145/2602988.2602996.Google ScholarGoogle Scholar
  12. 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´c, 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. S. M. Blackburn, R. Garner, C. Hoffman, A. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, S. Z. Guyer, A. Hosking, M. Jump, J. E. B. Moss, D. Stefanovic, T. Van-Drunen, D. von Dincklage, and B. Widerman. Wake up and smell the coffee: Evaluation methodology for the 21st century. Commun. ACM, 51(8):83–89, Aug. 2008. doi: 10.1145/ 1378704.1378723. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. T. Brecht, E. Arjomandi, C. Li, and H. Pham. Controlling garbage collection and heap growth to reduce the execution time of Java applications. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 353–366, Tampa, Florida, Nov. 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. doi: 10.1145/504282.504308.Google ScholarGoogle Scholar
  16. D. Brodowski. CPU frequency and voltage scaling code in the Linux kernel. URL https://www.kernel.org/doc/ Documentation/cpu-freq/governors.txt.Google ScholarGoogle Scholar
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. A. Carroll and G. Heiser. An analysis of power consumption in a smartphone. In USENIX Annual Technical Conference, pages 271–284, Boston, Massachusetts, June 2010. URL https://www.usenix.org/legacy/event/ atc10/tech/full_papers/Carroll.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle ScholarCross RefCross Ref
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. 378823.Google ScholarGoogle Scholar
  24. S. Dieckmann and U. Hölzle. A study of the allocation behavior of the SPECjvm98 Java benchmarks. In European Conference on Object-Oriented Programming, Lecture Notes in Computer Science, pages 92–115, Lisbon, Portugal, July 1999. doi: 10.1007/3-540-48743-3_5. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. D. Ehringer. The Dalvik Virtual Machine Architecture, Mar. 2010. URL http://davidehringer.com/software/ android/The_Dalvik_Virtual_Machine.pdf.Google ScholarGoogle Scholar
  26. H. Esmaeilzadeh, T. Cao, Y. Xi, S. M. Blackburn, and K. S. McKinley. Looking back on the language and hardware revolutions: Measured power, performance, and scaling. In ACM Conference on Architectural Support for Programming Languages and Operating Systems, pages 319–332, Newport Beach, California, Mar. 2011. doi: 10.1145/1950365.1950402. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. A. Gautham, K. Korgaonkar, P. Slpsk, S. Balachandran, and K. Veezhinathan. The implications of shared data synchronization techniques on multi-core energy efficiency. In USENIX Conference on Power-Aware Computing and Systems, HotPower, Hollywood, California, Oct. 2012. URL https://www.usenix.org/system/files/ conference/hotpower12/hotpower12-final40.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. S. Hao, D. Li, W. G. J. Halfond, and R. Govindan. Estimating mobile application energy consumption using program analysis. In International Conference on Software Engineering, pages 92–101, San Francisco, California, May 2013. IEEE Press. doi: 10.1109/ICSE.2013.6606555. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. Intrinsync. DragonBoard development board based on the Qualcomm Snapdragon 800 processor (APQ8074). URL http://mydragonboard.org/db8074.Google ScholarGoogle Scholar
  31. C. Isen, L. John, J. P. Choi, and H. J. Song. On the representativeness of embedded Java benchmarks. In IEEE International Symposium on Workload Characterization, pages 153–162, Seattle, Washington, Sept. 2008. doi: 10.1109/IISWC.2008.Google ScholarGoogle ScholarCross RefCross Ref
  32. 4636100.Google ScholarGoogle Scholar
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. R. Jones, A. Hosking, and E. Moss. The Garbage Collection Handbook: The Art of Automatic Memory Management. Chapman & Hall/CRC Press, 2011. Google ScholarGoogle ScholarCross RefCross Ref
  35. T. Kalibera, M. Mole, R. Jones, and J. Vitek. A blackbox approach to understanding concurrency in DaCapo. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 335–354, Tucson, Arizona, Oct. 2012. doi: 10.1145/2384616.2384641. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. M. Kambadur and M. A. Kim. An experimental survey of energy management across the stack. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 329–344, Portland, Oregon, Oct. 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. doi: 10.1145/2660193.2660196.Google ScholarGoogle Scholar
  38. M. Maas, P. Reames, J. Morlan, K. Asanovi´c, A. D. Joseph, and J. Kubiatowicz. GPUs as an opportunity for offloading garbage collection. In ACM SIGPLAN International Symposium on Memory Management, pages 25–36, Beijing, China, 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. doi: 10.1145/2258996.2259002.Google ScholarGoogle Scholar
  40. 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. ACM. doi: 10.1145/514191.514200. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. monkeyrunner. URL http://developer.android.com/ tools/help/monkeyrunner_concepts.html.Google ScholarGoogle Scholar
  42. National Instruments. NI USB-6008/6009 user guide and specifications: Bus-powered multifunction DAQ USB device, Feb. 2012. URL http://www.ni.com/pdf/manuals/371303m. pdf.Google ScholarGoogle Scholar
  43. S. Park, W. Jiang, Y. Zhou, and S. Adve. Managing energyperformance tradeoffs for multithreaded applications on multiprocessor architectures. In ACM SIGMETRICS International Conference on Measurement and Modeling of Computer Systems, pages 169–180, San Diego, California, June 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. doi: 10.1145/1254882.1254902.Google ScholarGoogle Scholar
  45. A. Pathak, Y. C. Hu, M. Zhang, P. Bahl, and Y.-M. Wang. Finegrained 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 ScholarGoogle ScholarDigital LibraryDigital Library
  46. 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. doi: 10.1145/2168836.2168841.Google ScholarGoogle Scholar
  48. G. Pinto, F. Castor, and Y. D. Liu. Understanding energy behaviors of thread management constructs. In ACM SIGPLAN Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 345–360, Portland, Oregon, Oct. 2014. doi: 10.1145/2660193.2660235. Google ScholarGoogle ScholarDigital LibraryDigital Library
  49. T. Printezis. On measuring garbage collection responsiveness. Science of Computer Programming, 62(2):164–183, Oct. 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  50. doi: 10.1016/j.scico.2006.02.004.Google ScholarGoogle Scholar
  51. Qualcomm. Snapdragon S4 processors: System on chip solutions for a new mobile age, Oct. 2011. URL http: //tinyurl.com/q2yzn9r.Google ScholarGoogle Scholar
  52. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  53. S. Schwarzer, P. Peschlow, L. Pustina, and P. Martini. Automatic estimation of performance requirements for software tasks of mobile devices. In ACM/SPEC International Conference on Performance Engineering, ICPE, pages 347–358, Karlsruhe, Germany, 2011. doi: 10.1145/1958746.1958796. Google ScholarGoogle ScholarDigital LibraryDigital Library
  54. T. Sherwood, E. Perelman, G. Hamerly, S. Sair, and B. Calder. Discovering and exploiting program phases. IEEE Micro, 23 (6):84–93, Nov. 2003. doi: 10.1109/MM.2003.1261391. Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. Standard Performance Evaluation Corporation. SPECjvm98 Benchmarks, release 1.03 edition, Mar. 1999. URL http: //www.spec.org/jvm98.Google ScholarGoogle Scholar
  56. N. Vijaykrishnan, M. Kandemir, S. Kim, S. Tomar, A. Sivasubramaniam, and M. J. Irwin. Energy behavior of Java applications from the memory perspective. In USENIX Java Virtual Machine Research and Technology Symposium, Monterey, California, Apr. 2001. URL https://www.usenix.org/legacy/events/jvm01/ full_papers/vijaykrishnan/vijaykrishnan.pdf. Google ScholarGoogle ScholarDigital LibraryDigital Library
  57. V. M. Weaver. Linux perf_event features and overhead. In International Workshop on Performance Analysis of Workload Optimized Systems, FastPath, 2013. URL http://researcher.watson.ibm.com/researcher/ files/us-ajvega/FastPath_Weaver_Talk.pdf.Google ScholarGoogle Scholar
  58. V. M. Weaver, D. Terpstra, and S. Moore. Non-determinism and overcount on modern hardware performance counter implementations. IEEE International Symposium on Performance Analysis of Systems and Software, pages 215–224, Apr. 2013.Google ScholarGoogle ScholarCross RefCross Ref
  59. doi: 10.1109/ISPASS.2013.6557172.Google ScholarGoogle Scholar
  60. N. H. E. Weste and K. Eshraghian. Principles of CMOS VLSI Design: A Systems Perspective. Addison-Wesley, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  61. 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  62. doi: 10.1145/1347375.1347389.Google ScholarGoogle Scholar

Index Terms

  1. Don't race the memory bus: taming the GC leadfoot

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          • Published in

            cover image ACM SIGPLAN Notices
            ACM SIGPLAN Notices  Volume 50, Issue 11
            ISMM '15
            November 2015
            156 pages
            ISSN:0362-1340
            EISSN:1558-1160
            DOI:10.1145/2887746
            Issue’s Table of Contents
            • cover image ACM Conferences
              ISMM '15: Proceedings of the 2015 International Symposium on Memory Management
              June 2015
              156 pages
              ISBN:9781450335898
              DOI:10.1145/2754169

            Copyright © 2015 ACM

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 14 June 2015

            Check for updates

            Qualifiers

            • research-article

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader
          About Cookies On This Site

          We use cookies to ensure that we give you the best experience on our website.

          Learn more

          Got it!