Abstract
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 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 footprint) and suffer from increased execution times due to paging.In this article, we use a large set of Java applications and the highly tuned and widely used Boehm-Demers-Weiser (BDW) conservative mark-and-sweep garbage collector to experimentally examine the extent to which the frequency of garbage collection impacts an application's execution time, footprint, and pause times. We use these results to devise some guidelines for controlling garbage collection and heap growth in a conservative garbage collector in order to minimize application execution times. Then we describe new strategies for controlling garbage collection and heap growth that impact not only the frequency with which garbage collection occurs but also the points at which it occurs. Experimental results demonstrate that when compared with the existing approach used in the standard BDW collector, our new strategy can significantly reduce application execution times.Our goal is to obtain a better understanding of how to control garbage collection and heap growth for an individual application executing in isolation. These results can be applied in a number of high-performance computing and server environments, in addition to some single-user environments. This work should also provide insights into how to make better decisions that impact garbage collection in multiprogrammed environments.
- Alonso, R. and Appel, A. W. 1990. Advisor for flexible working sets. In Proceedings of the ACM Sigmetrics Conference on Measurement and Modeling of Computer Systems (Boulder CO). ACM Press, 153--162. Google Scholar
- Andreasson, E., Hoffmann, F., and Lindholm, O. 2002. Memory management through machine learning: To collect or not to collect? In Usenix Java Virtual Machine Research and Technology Symposium (JVM) (San Fransisco, CA). Google Scholar
- Appel, A. 2003. Personal communication.Google Scholar
- Appel, A. W. 1989. Simple generational garbage collection and fast allocation. Softw. Pract. Exper. 19, 2, 171--183. Google Scholar
- Attanasio, C. R., Bacon, D. F., Cocchi, A., and Smith, S. 2001. A comparative evaluation of parallel garbage collectors. In Proceedings of the 14th Annual Workshop on Languages and Compilers for Parallel Computing (Cumberland Falls, KT). Lecture Notes in Computer Science Springer Verlag. Google Scholar
- Azatchi, H., Levanoni, Y., Paz, H., and Petrank, E. 2003. An on-the-fly mark-and-sweep garbage collector based on sliding view. In Proceedings of the (OOPSLA) ACM Conference on Object-Oriented Systems, Languages and Applications (Anaheim, CA). ACM SIGPLAN Notices. Google Scholar
- Bacon, D. F., Attanasio, C. R., Lee, H. B., Rajan, V. T., and Smith, S. 2001. Java without the coffee breaks: A nonintrusive multiprocessor garbage collector. In Proceedings of the SIGPLAN Conference on Programming Languages Design and Implementation (Snowbird, UT). ACM SIGPLAN Notices. Google Scholar
- Barabash, K., Ossia, Y., and Petrank, E. 2003. Mostly concurrent garbage collection revisited. In Proceedings of the (OOPSLA) ACM Conference on Object-Oriented Systems, Languages and Applications (Anaheim, CA). ACM SIGPLAN Notices. Google Scholar
- Boehm, H.-J. 2000. Reducing garbage collector cache misses. In Proceedings of the 2nd International Symposium on Memory Management (Minneapolis, MN), T. Hosking, Ed. ACM SIGPLAN Notices 36, 1. Google Scholar
- Boehm, H.-J. 2004. A garbage collector for C and C++. Hans Boehm's Web page for his garbage collector, http://www.hpl.hp.com/personal/Hans_Boehm/gc/.Google Scholar
- Boehm, H.-J. and Weiser, M. 1988. Garbage collection in an uncooperative environment. Softw. Pract. Exper. 18, 9, 807--820. Google Scholar
- Chilimbi, T. M. and Larus, J. R. 1998. Using generational garbage collection to implement cache-conscious data placement. In Proceedings of the 1st International Symposium on Memory Management (Vancouver, BC), R. Jones, Ed. ACM SIGPLAN Notices 34, 3, 37--48. Google Scholar
- Cooper, E., Nettles, S., and Subramanian, I. 1992. Improving the performance of SML garbage collection using application-specific virtual memory management. In Conference Record of the ACM Symposium on Lisp and Functional Programming (San Fransisco, CA). ACM Press, 43--52. Google Scholar
- Dimpsey, R., Arora, R., and Kuiper, K. 2000. Java server performance: A case study of building efficient, scalable JVMs. IBM Syst. J. 39, 1, 151--174. Google Scholar
- Domani, T., Kolodner, E., and Petrank, E. 2000. A generational on-the-fly garbage collector for Java. In Proceedings of SIGPLAN Conference on Programming Languages Design and Implementation (Vancouver, BC). ACM SIGPLAN Notices. Google Scholar
- Fitzgerald, R. and Tarditi, D. 2000. The case for profile-directed selection of garbage collectors. In Proceedings of the 2nd International Symposium on Memory Management (Minneapolis, MN) T. Hosking, Ed. ACM SIGPLAN Notices 36, 1. Google Scholar
- Geodesic Systems, Inc. 2002. REMIDI. Geodesic Systems, Inc. http://www.geodesic.com/solutions/remidi.html.Google Scholar
- Grunwald, D., Zorn, B., and Henderson, R. 1993. Improving the cache locality of memory allocation. In Proceedings of the SIGPLAN Conference on Programming Languages Design and Implementation (Albuquerque, NM). ACM SIGPLAN Notices 28, 6, 177--186. Google Scholar
- Jones, R. E. and Lins, R. 1996. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. Wiley Somerset, NJ. Google Scholar
- Kim, T., Chang, N., and Shin, H. 2000. Bounding worst case garbage collection time for embedded real-time systems. In Proceedings of the 6th IEEE Real Time Technology and Applications Symposium (RTAS). Google Scholar
- Moon, D. A. 1984. Garbage collection in a large LISP system. In Conference Record of the ACM Symposium on Lisp and Functional Programming (Austin, TX), G. L. Steele, Ed. ACM Press, 235--245. Google Scholar
- Ossia, Y., Ben-Yitzhak, O., Goft, I., Kolodner, E. K., Leikehman, V., and Owshanko, A. 2002. A parallel, incremental and concurrent GC for servers. In Proceedings of SIGPLAN Conference on Programming Languages Design and Implementation (Berlin, Germany). ACM SIGPLAN Notices 129--140. Google Scholar
- Printezis, T. 2001. Hot-Swapping between a mark-and-sweep and a mark-and-compact garbage collector in a generational environment. In Proceedings of the Java Virtual Machine Research and Technology Symposium. USENIX. Google Scholar
- Shaham, R., Kolodner, E. K., and Sagiv, M. 2000. On the effectiveness of GC in Java. In ISMM Proceedings of the 2nd International Symposium on Memory Management (Minneapolis, MN), T. Hosking, Ed. ACM SIGPLAN Notices 36, 1. Google Scholar
- Shuf, Y., Serrano, M., Gupta, M., and Singh, J. P. 2001. Characterizing the memory behavior of Java workloads: A structured view and opportunities for optimizations. In Proceedings of the SIGMETRICS Conference. Google Scholar
- Sun Microsystems. 2005. Tuning garbage collection with the 5.0 Java virtual machine. http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html.Google Scholar
- Smith, F. and Morrisett, G. 1998. Comparing mostly-copying and mark-sweep conservative collection. In Proceedings of the 1st International Symposium on Memory Management (Vancouver, BC), R. Jones, Ed. ACM SIGPLAN Notices 34, 3, 68--78. Google Scholar
- Ungar, D. M. and Jackson, F. 1988. Tenuring policies for generation-based storage reclamation. ACM SIGPLAN Notices 23, 11, 1--17. Google Scholar
- Ungar, D. M. and Jackson, F. 1992. An adaptive tenuring policy for generation scavengers. ACM Trans. Program. Lang. Syst. 14, 1, 1--27. Google Scholar
- Wilson, P. R. 1994. Uniprocessor garbage collection techniques. Tech. Rep., University of Texas.Google Scholar
- Wilson, P. R., Johnstone, M. S., Neely, M., and Boles, D. 1995. Dynamic storage allocation: A survey and critical review. In Proceedings of the International Workshop on Memory Management (Kinross, Scotland), H. Baker, Ed. Lecture Notes in Computer Science, vol. 986. Springer Verlag. Google Scholar
- Wilson, P. R., Lam, M. S., and Moher, T. G. 1991. Effective static-graph reorganization to improve locality in garbage collected systems. ACM SIGPLAN Notices 26, 6, 177--191. Google Scholar
- Wilson, P. R., Lam, M. S., and Moher, T. G. 1992. Caching considerations for generational garbage collection. In Conference Record of the ACM Symposium on Lisp and Functional Programming (San Fransisco, CA). ACM Press, 32--42. Google Scholar
- Zorn, B. 1990. Comparing mark-and-sweep and stop-and-copy garbage collection. In Conference Record of the ACM Symposium on Lisp and Functional Programming (Nice, France). ACM Press. Google Scholar
- Zorn, B. 1991. The effect of garbage collection on cache performance. Tech. Rep. CU-CS-528-91, University of Colorado at Boulder.Google Scholar
- Zorn, B. 1993. The measured cost of conservative garbage collection. Softw. Pract. Exper. 23, 733--756. Google Scholar
Index Terms
Controlling garbage collection and heap growth to reduce the execution time of Java applications
Recommendations
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 garbage frequently enough. Garbage collection that occurs too frequently may introduce unnecessary overheads at the rist 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 ...
Implementing an on-the-fly garbage collector for Java
ISMM '00: Proceedings of the 2nd international symposium on Memory managementJava uses garbage collection (GC) for the automatic reclamation of computer memory no longer required by a running application. GC implementations for Java Virtual Machines (JVM) are typically designed for single processor machines, and do not ...






Comments