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.













Similar content being viewed by others
Explore related subjects
Discover the latest articles, news and stories from top researchers in related subjects.Notes
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
Oracle America Inc., JSR-000901 Java Language Specification. http://docs.oracle.com/javase/specs/ jls/se8/html/index.html.
Hejlsberg, A., Wiltamuth, S., and Golde, P., C# Language Specification, Boston: Addison-Wesley, 2003.
Odersky, M., Spoon, L., and Venners, B., Programming in Scala: A Comprehensive Step-by-Step Guide, Artima Inc., 2008, 1st ed.
Jones, R., Hosking, A., and Moss, E., The Garbage Collection Handbook: The Art of Automatic Memory Management, Chapman & Hall/CRC, 2011, 1st ed.
Wilson, P.R., Uniprocessor garbage collection techniques, Proc. Int. Workshop Memory Management (IWMM), London, 1992, pp. 1–42.
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.
Gurevich, Yu., Evolving algebras 1993: Lipari guide, Specification and Validation Methods, Oxford University Press, 1995, pp. 9–36.
Zamulin, A., An ASM-based formal model of a Java program, Program. Comput. Software, 2003, vol. 29, no. 3, pp. 130–139.
JForum Team., JForum website. http://www.jforum. net.
The Apache Software Foundation, Apache Tomcat official website. http://tomcat.apache.org/index.html.
Eclipse Foundation Inc., Eclipse Foundation open source community website. http://www.eclipse.org.
Standard Performance Evaluation Corporation, SPEC Organization website. http://www.spec.org.
Oracle America Inc., Java Platform, Standard Edition 8 API Specification. https://docs.oracle.com/javase/8/ docs/api.
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.
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.
Morris, F.L., A time- and space-efficient garbage compaction algorithm, Commun. ACM, 1978, vol. 21, no. 8, pp. 662–665.
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.
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.
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.
Author information
Authors and Affiliations
Corresponding authors
Additional information
Translated by Yu. Kornienko
Rights and permissions
About this article
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
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1134/S0361768819010043