skip to main content
10.1145/2908080.2908106acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article
Open access

Idle time garbage collection scheduling

Published: 02 June 2016 Publication History

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.

Supplementary Material

Auxiliary Archive (p570-degenbaev-s.zip)
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.

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.
[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.
[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.
[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.
[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.
[6]
H. G. Baker, Jr. List Processing in Real Time on a Serial Computer. Commun. ACM, 21(4):280–294, Apr. 1978.
[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.
[8]
J. Bentley. Programming Pearls: Algorithm Design Techniques. Commun. ACM, 27(9):865–873, Sept. 1984.
[9]
Browserbench. Jetstream. http://browserbench. org/JetStream,. Accessed: 2016-03-15.
[10]
Browserbench. Speedometer. http://browserbench. org/Speedometer,. Accessed: 2016-03-15.
[11]
G. Buttazzo. Red: Robust earliest deadline scheduling. In Proceedings of the 3rd International Workshop on Responsive Computing Systems, pages 100–111, 1993.
[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.
[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.
[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.
[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.
[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.
[17]
Google Inc. Android Runtime (ART). http://source.android.com/devices/tech/ dalvik/index.html,. Accessed: 2016-03-15.
[18]
Google Inc. V8 Design. https://code.google.com/ p/v8/design,. Accessed: 2016-03-15.
[19]
Google Inc. Octane. https://developers.google. com/octane,. Accessed: 2016-03-15.
[20]
Google Inc. The RAIL performance model. http://developers.google.com/web/tools/ chrome-devtools/profile/evaluateperformance/rail,. Accessed: 2016-03-15.
[21]
Henriksson. Scheduling Garbage Collection in Embedded Systems. PhD thesis, Lund University, July 1998.
[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.
[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.
[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.
[25]
Khronos Group. WebGL. http://www.khronos.org/ webgl. Accessed: 2016-03-15.
[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.
[27]
R. McIlroy. Cooperative scheduling of background tasks. http://w3c.github.io/requestidlecallback. Accessed: 2016-03-15.
[28]
R. Miller. Response time in man-computer conversational transactions. In Proceedings of the Fall Joint Computer Conference, 1968.
[29]
Mozilla Foundation. Kraken Benchmark. http://krakenbenchmark.mozilla.org. Accessed: 2016-03-15.
[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.
[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.
[32]
The Node.js Developers. Node.js. http://nodejs. org/. Accessed: 2016-03-15.
[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.
[34]
Turbulenz Limited. Turbulenz Engine. http://biz.turbulenz.com. Accessed: 2016-03-15.
[35]
P. R. Wilson. Opportunistic Garbage Collection. SIGPLAN Not., 23(12):98–102, Dec. 1988.
[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.

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
PLDI '16: Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation
June 2016
726 pages
ISBN:9781450342612
DOI:10.1145/2908080
  • General Chair:
  • Chandra Krintz,
  • Program Chair:
  • Emery Berger
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 51, Issue 6
    PLDI '16
    June 2016
    726 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2980983
    • Editor:
    • Andy Gill
    Issue’s Table of Contents
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike International 4.0 License.

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 02 June 2016

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Browser Technology
  2. Garbage Collection
  3. JavaScript
  4. Memory Management
  5. Scheduling
  6. Virtual Machines
  7. Web Applications

Qualifiers

  • Research-article

Conference

PLDI '16
Sponsor:

Acceptance Rates

Overall Acceptance Rate 406 of 2,067 submissions, 20%

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)189
  • Downloads (Last 6 weeks)29
Reflects downloads up to 27 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media