Skip to main content
Log in

Quantitative Evaluation of Thread-Local Garbage Collection Efficiency for Java

  • Published:
Programming and Computer Software Aims and scope Submit manuscript

Abstract

This paper discusses thread-local garbage collection (GC), a technique of automatic memory management aimed at improving GC throughput and reducing GC pauses in managed runtimes. It exploits the observation that most objects do not escape the scope of the thread allocated them; therefore, memory occupied by these objects can be reclaimed locally within the thread. The question is how to efficiently compute this property at run time while achieving a good tradeoff between the precision of necessary dynamic analysis and the implied overheads for application performance. This paper gives a formal definition of thread-local reachability in the heap graph and proposes several strategies to compute it. Having implemented these strategies in a Java virtual machine, we present results of quantitative evaluation of the amount of thread-local objects discovered with a representative test suite of modern Java applications.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Fig. 1.
Fig. 2.
Fig. 3.
Fig. 4.
Fig. 5.
Fig. 6.
Fig. 7.
Fig. 8.
Fig. 9.
Fig. 10.
Fig. 11.
Fig. 12.
Fig. 13.

Similar content being viewed by others

Notes

  1. The proposed model is adequate to modern high-level languages with garbage collection that do not allow one to get object address and use address arithmetic.

REFERENCES

  1. Oracle America Inc., JSR-000901 Java Language Specification. http://docs.oracle.com/javase/specs/ jls/se8/html/index.html.

  2. Hejlsberg, A., Wiltamuth, S., and Golde, P., C# Language Specification, Boston: Addison-Wesley, 2003.

    Google Scholar 

  3. Odersky, M., Spoon, L., and Venners, B., Programming in Scala: A Comprehensive Step-by-Step Guide, Artima Inc., 2008, 1st ed.

    Google Scholar 

  4. Jones, R., Hosking, A., and Moss, E., The Garbage Collection Handbook: The Art of Automatic Memory Management, Chapman & Hall/CRC, 2011, 1st ed.

    Book  Google Scholar 

  5. Wilson, P.R., Uniprocessor garbage collection techniques, Proc. Int. Workshop Memory Management (IWMM), London, 1992, pp. 1–42.

  6. Mikheev, V., Lipsky, N., Gurchenkov, D., Pavlov, P., Sukharev, V., Markov, A., Kuksenko, S., Fedoseev, S., Leskov, D., and Yeryomin, A., Overview of Excelsior JET, a high performance alternative to Java virtual machines, Proc. 3rd Int. Workshop on Software and Performance, (WOSP), New York, 2002, pp. 104–113.

  7. Gurevich, Yu., Evolving algebras 1993: Lipari guide, Specification and Validation Methods, Oxford University Press, 1995, pp. 9–36.

    MATH  Google Scholar 

  8. Zamulin, A., An ASM-based formal model of a Java program, Program. Comput. Software, 2003, vol. 29, no. 3, pp. 130–139.

    Article  MathSciNet  MATH  Google Scholar 

  9. JForum Team., JForum website. http://www.jforum. net.

  10. The Apache Software Foundation, Apache Tomcat official website. http://tomcat.apache.org/index.html.

  11. Eclipse Foundation Inc., Eclipse Foundation open source community website. http://www.eclipse.org.

  12. Standard Performance Evaluation Corporation, SPEC Organization website. http://www.spec.org.

  13. Oracle America Inc., Java Platform, Standard Edition 8 API Specification. https://docs.oracle.com/javase/8/ docs/api.

  14. Choi, J.D., Gupta, M., Serrano, M., Sreedhar, V.C., and Midkiff, S., Escape analysis for Java, Proc. Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), 1999, pp. 1–19.

    Google Scholar 

  15. Gal, T.D., Goldshtein, G., Kolodner, E.K., Lewis, E., Petrank, E., and Sheinwald, D., Thread-local heaps for Java, Proc. Special Interest Group on Programming Languages (SIGPLAN), 2002, pp. 76–87.

    Google Scholar 

  16. Morris, F.L., A time- and space-efficient garbage compaction algorithm, Commun. ACM, 1978, vol. 21, no. 8, pp. 662–665.

    Article  MATH  Google Scholar 

  17. Wrigstad, T., Pizlo, F., Meawad, F., Zhao, L., and Vitek, J., Loci: Simple threadlocality for Java, Drossopoulou, S., Ed., Lecture Notes in Computer Science, Berlin: Springer, 2009, vol. 5653, pp. 445–469.

    Google Scholar 

  18. Mole, M., Jones, R., and Kalibera, T., A study of sharing definitions in thread-local heaps, Proc. Implementation, Compilation, Optimization of Object-Oriented Languages, Programs and Systems Workshop (ICOOOLPS), 2012.

  19. Alpern, B., Augart, S., Blackburn, S.M., Butrico, M., Cocchi, A., Cheng, P., Dolby, J., Fink, S., Grove, D., Hind, M., McKinley, K.S., Mergen, M., Moss, J.E.B., Ngo, T., and Sarkar, V., The Jikes research virtual machine project: Building an open-source research community, IBM Syst. J., 2005, vol. 44, no. 2, pp. 399–417.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to A. Yu. Filatov or V. V. Mikheev.

Additional information

Translated by Yu. Kornienko

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Filatov, A.Y., Mikheev, V.V. Quantitative Evaluation of Thread-Local Garbage Collection Efficiency for Java. Program Comput Soft 45, 1–11 (2019). https://doi.org/10.1134/S0361768819010043

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1134/S0361768819010043

Navigation