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.
Supplemental Material
Available for Download
The PLDI'16 artifact evaluation committee declared the experiments presented in the paper as reproducible. The artifact explains in detail how to run the experiments.
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- H. G. Baker, Jr. List Processing in Real Time on a Serial Computer. Commun. ACM, 21(4):280–294, Apr. 1978. Google Scholar
Digital Library
- 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 Scholar
Digital Library
- J. Bentley. Programming Pearls: Algorithm Design Techniques. Commun. ACM, 27(9):865–873, Sept. 1984. Google Scholar
Digital Library
- Browserbench. Jetstream. http://browserbench. org/JetStream,. Accessed: 2016-03-15.Google Scholar
- Browserbench. Speedometer. http://browserbench. org/Speedometer,. Accessed: 2016-03-15.Google Scholar
- G. Buttazzo. Red: Robust earliest deadline scheduling. In Proceedings of the 3rd International Workshop on Responsive Computing Systems, pages 100–111, 1993.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Google Inc. Android Runtime (ART). http://source.android.com/devices/tech/ dalvik/index.html,. Accessed: 2016-03-15.Google Scholar
- Google Inc. V8 Design. https://code.google.com/ p/v8/design,. Accessed: 2016-03-15.Google Scholar
- Google Inc. Octane. https://developers.google. com/octane,. Accessed: 2016-03-15.Google Scholar
- Google Inc. The RAIL performance model. http://developers.google.com/web/tools/ chrome-devtools/profile/evaluateperformance/rail,. Accessed: 2016-03-15.Google Scholar
- Henriksson. Scheduling Garbage Collection in Embedded Systems. PhD thesis, Lund University, July 1998.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Khronos Group. WebGL. http://www.khronos.org/ webgl. Accessed: 2016-03-15.Google Scholar
- 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 Scholar
- R. McIlroy. Cooperative scheduling of background tasks. http://w3c.github.io/requestidlecallback. Accessed: 2016-03-15.Google Scholar
- R. Miller. Response time in man-computer conversational transactions. In Proceedings of the Fall Joint Computer Conference, 1968. Google Scholar
Digital Library
- Mozilla Foundation. Kraken Benchmark. http://krakenbenchmark.mozilla.org. Accessed: 2016-03-15.Google Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- The Node.js Developers. Node.js. http://nodejs. org/. Accessed: 2016-03-15.Google Scholar
- 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 Scholar
Digital Library
- Turbulenz Limited. Turbulenz Engine. http://biz.turbulenz.com. Accessed: 2016-03-15.Google Scholar
- P. R. Wilson. Opportunistic Garbage Collection. SIGPLAN Not., 23(12):98–102, Dec. 1988. Google Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
Idle time garbage collection scheduling
Recommendations
Idle time garbage collection scheduling
PLDI '16: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and ImplementationEfficient 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 ...
Controlling garbage collection and heap growth to reduce the execution time of Java applications
In systems that support garbage collection, a tension exists between collecting garbage too frequently and not collecting it frequently enough. Garbage collection that occurs too frequently may introduce unnecessary overheads at the risk of not ...
A generational on-the-fly garbage collector for Java
PLDI '00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementationAn on-the-fly garbage collector does not stop the program threads to perform the collection. Instead, the collector executes in a separate thread (or process) in parallel to the program. On-the-fly collectors are useful for multi-threaded applications ...







Comments