skip to main content
article
Open Access

Idle time garbage collection scheduling

Published:02 June 2016Publication History
Skip Abstract Section

Abstract

Efficient garbage collection is increasingly important in today's managed language runtime systems that demand low latency, low memory consumption, and high throughput. Garbage collection may pause the application for many milliseconds to identify live memory, free unused memory, and compact fragmented regions of memory, even when employing concurrent garbage collection. In animation-based applications that require 60 frames per second, these pause times may be observable, degrading user experience. This paper introduces idle time garbage collection scheduling to increase the responsiveness of applications by hiding expensive garbage collection operations inside of small, otherwise unused idle portions of the application's execution, resulting in smoother animations. Additionally we take advantage of idleness to reduce memory consumption while allowing higher memory use when high throughput is required. We implemented idle time garbage collection scheduling in V8, an open-source, production JavaScript virtual machine running within Chrome. We present performance results on various benchmarks running popular webpages and show that idle time garbage collection scheduling can significantly improve latency and memory consumption. Furthermore, we introduce a new metric called frame time discrepancy to quantify the quality of the user experience and precisely measure the improvements that idle time garbage collection provides for a WebGL-based game benchmark. Idle time garbage collection is shipped and enabled by default in Chrome.

Skip Supplemental Material Section

Supplemental Material

References

  1. M. Aigner, T. Hütter, C. M. Kirsch, A. Miller, H. Payer, and M. Preishuber. ACDC-JS: Explorative Benchmarking of Javascript Memory Management. In Proceedings of the 10th ACM Symposium on Dynamic Languages, DLS ’14, pages 67–78, New York, NY, USA, 2014. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. J. Auerbach, D. F. Bacon, P. Cheng, D. Grove, B. Biron, C. Gracie, B. McCloskey, A. Micic, and R. Sciampacone. Tax- and-spend: Democratic Scheduling for Real-time Garbage Collection. In Proceedings of the 8th ACM International Conference on Embedded Software, EMSOFT ’08, pages 245– 254. ACM, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. D. F. Bacon, P. Cheng, and V. T. Rajan. A Real-time Garbage Collector with Low Overhead and Consistent Utilization. In Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’03, pages 285–298. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. F. Bacon, P. Cheng, and V. T. Rajan. Controlling Fragmentation and Space Consumption in the Metronome, a Real-time Garbage Collector for Java. In Proceedings of the 2003 ACM SIGPLAN Conference on Language, Compiler, and Tool for Embedded Systems, LCTES ’03, pages 81–92. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. F. Bacon, P. Cheng, and D. Grove. TuningFork: A Platform for Visualization and Analysis of Complex Real-time Systems. In Companion to the 22nd ACM SIGPLAN Conference on Object-oriented Programming Systems and Applications Companion, OOPSLA ’07, pages 854–855. ACM, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. H. G. Baker, Jr. List Processing in Real Time on a Serial Computer. Commun. ACM, 21(4):280–294, Apr. 1978. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. O. Ben-Yitzhak, I. Goft, E. K. Kolodner, K. Kuiper, and V. Leikehman. An Algorithm for Parallel Incremental Compaction. In Proceedings of the 3rd International Symposium on Memory Management, ISMM ’02, pages 100–105. ACM, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. J. Bentley. Programming Pearls: Algorithm Design Techniques. Commun. ACM, 27(9):865–873, Sept. 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. Browserbench. Jetstream. http://browserbench. org/JetStream,. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  10. Browserbench. Speedometer. http://browserbench. org/Speedometer,. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  11. G. Buttazzo. Red: Robust earliest deadline scheduling. In Proceedings of the 3rd International Workshop on Responsive Computing Systems, pages 100–111, 1993.Google ScholarGoogle Scholar
  12. P. Cheng and G. E. Blelloch. A Parallel, Real-time Garbage Collector. In Proceedings of the ACM SIGPLAN 2001 Conference on Programming Language Design and Implementation, PLDI ’01, pages 125–136. ACM, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Clifford, H. Payer, M. Starzinger, and B. L. Titzer. Allocation Folding Based on Dominance. In Proceedings of the 2014 International Symposium on Memory Management, ISMM ’14, pages 15–24. ACM, 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Clifford, H. Payer, M. Stanton, and B. L. Titzer. Memento Mori: Dynamic Allocation-site-based Optimizations. In Proceedings of the 2015 International Symposium on Memory Management, ISMM ’15, pages 105–117. ACM, 2015. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. U. Degenbaev, J. Eisinger, M. Ernst, R. McIlroy, and H. Payer. PLDI’16 Artifact: Idle Time Garbage Collection Scheduling. https://goo.gl/AxvigS. Accessed: 2016-04-10. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. Flood, D. Detlefs, N. Shavit, and C. Zhang. Parallel Garbage Collection for Shared Memory Multiprocessors. In Proceedings of the 1st Java Virtual Machine Research and Technology Symposium, April 23-24, 2001, Monterey, CA, USA. USENIX, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Google Inc. Android Runtime (ART). http://source.android.com/devices/tech/ dalvik/index.html,. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  18. Google Inc. V8 Design. https://code.google.com/ p/v8/design,. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  19. Google Inc. Octane. https://developers.google. com/octane,. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  20. Google Inc. The RAIL performance model. http://developers.google.com/web/tools/ chrome-devtools/profile/evaluateperformance/rail,. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  21. Henriksson. Scheduling Garbage Collection in Embedded Systems. PhD thesis, Lund University, July 1998.Google ScholarGoogle Scholar
  22. A. Imai and E. Tick. Evaluation of Parallel Copying Garbage Collection on a Shared-Memory Multiprocessor. Transactions on Parallel and Distributed Systems, 4(9):1030–1040, 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. R. Jones, A. Hosking, and E. Moss. The Garbage Collection Handbook: The Art of Automatic Memory Management. CRC Applied Algorithms and Data Structures. Chapman & Hall, Jan. 2012. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. T. Kalibera, F. Pizlo, A. L. Hosking, and J. Vitek. Scheduling Real-time Garbage Collection on Uniprocessors. ACM Trans. Comput. Syst., 29(3):8:1–8:29, Aug. 2011. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Khronos Group. WebGL. http://www.khronos.org/ webgl. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  26. S. Kyostila and R. McIlroy. Scheduling Tasks Intelligently for Optimized Performance. http://blog.chromium.org/2015/04/ scheduling-tasks-intelligently-for_30. html. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  27. R. McIlroy. Cooperative scheduling of background tasks. http://w3c.github.io/requestidlecallback. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  28. R. Miller. Response time in man-computer conversational transactions. In Proceedings of the Fall Joint Computer Conference, 1968. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Mozilla Foundation. Kraken Benchmark. http://krakenbenchmark.mozilla.org. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  30. S. G. Robertz and R. Henriksson. Time-triggered Garbage Collection: Robust and Adaptive Real-time GC Scheduling for Embedded Systems. In Proceedings of the 2003 ACM SIGPLAN Conference on Language, Compiler, and Tool for Embedded Systems, LCTES ’03, pages 93–102. ACM, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. F. Siebert. Concurrent, Parallel, Real-time Garbagecollection. In Proceedings of the 2010 International Symposium on Memory Management, ISMM ’10, pages 11–20. ACM, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. The Node.js Developers. Node.js. http://nodejs. org/. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  33. S. Tilkov and S. Vinoski. Node.Js: Using JavaScript to Build High-Performance Network Programs. IEEE Internet Computing, 14(6):80–83, Nov. 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. Turbulenz Limited. Turbulenz Engine. http://biz.turbulenz.com. Accessed: 2016-03-15.Google ScholarGoogle Scholar
  35. P. R. Wilson. Opportunistic Garbage Collection. SIGPLAN Not., 23(12):98–102, Dec. 1988. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. P. R. Wilson and T. G. Moher. Design of the Opportunistic Garbage Collector. In Conference Proceedings on Objectoriented Programming Systems, Languages and Applications, OOPSLA ’89, pages 23–35. ACM, 1989. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Idle time garbage collection scheduling

      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

      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!