Controlling garbage collection and heap growth to reduce the execution time of Java applications

Citation
T. Brecht et al., Controlling garbage collection and heap growth to reduce the execution time of Java applications, ACM SIGPL N, 36(11), 2001, pp. 353-366
Citations number
20
Categorie Soggetti
Computer Science & Engineering
Journal title
ACM SIGPLAN NOTICES
ISSN journal
15232867 → ACNP
Volume
36
Issue
11
Year of publication
2001
Pages
353 - 366
Database
ISI
SICI code
1523-2867(200111)36:11<353:CGCAHG>2.0.ZU;2-Q
Abstract
In systems that support garbage collection, a tension exists between collec ting garbage too frequently and not collecting garbage frequently enough. G arbage collection that occurs too frequently may introduce unnecessary over heads at the risk of not collecting much garbage during each cycle. On the other hand, collecting garbage too infrequently can result in applications that execute with a large amount of virtual memory (i.e., with a large foot print) and suffer from increased execution times due to paging. In this paper, we use a large collection of Java (TM) applications and the highly tuned and widely used Boehm-Demers-Weiser (BDW) conservative mark-an d-sweep garbage collector to experimentally examine the extent to which the frequency of garbage collection impacts an application's execution time, f ootprint, and pause times. We use these results to devise some guidelines f or controlling garbage collection and heap growth in a conservative garbage collector in order to minimize application execution times. Then we descri be new strategies for controlling garbage collection and heap growth that i mpact not only the frequency with which garbage collection occurs but also the points at which garbage collection occurs. Experimental results demonst rate that, when compared with the existing approach used in the standard BD W collector, our new strategy can significantly reduce application executio n times. Our goal is to obtain a better understanding of how to control garbage coll ection and heap growth for an individual application executing in isolation . These results can be applied in a number of high-performance computing an d server environments, in addition to some single-user environments. This w ork should also provide insights into how to make better decisions that imp act garbage collection in multi-programmed environments.