Technical Papers

Garbage Collection 1

Thursday, 30 October – 8:30-10:00

8:30 - 9:00
Mostly Concurrent Garbage Collection Revisited

Katherine Barabash, IBM Haifa Research Laboratory,
Yoav Ossia, IBM Haifa Research Laboratory,
Erez Petrank, Technion - Israel Institute of Technology,

The mostly concurrent garbage collection was presented in the seminal paper of Boehm et al. With the deployment of Java as a portable, secure and concurrent programming language, the mostly concurrent garbage collector turned out to be an excellent solution for Java's garbage collection task. The use of this collector is reported for several modern production Java Virtual Machines, and it has been investigated further in academia.

In this paper, we present a modification of the mostly concurrent collector which improves the throughput, the memory footprint, and the cache behavior of the collector without foiling the other good qualities (such as short pauses and high scalability). We implemented our solution on the IBM production JVM and obtained a performance improvement of up to 22.8%, a reduction in the heap consumption by up to 13.6%, and no substantial change in the (short) pause times. The modified algorithm has subsequently been incorporated into the IBM production JVM.

9:00 - 9:30
An On-the-Fly Mark and Sweep Garbage Collector Based on Sliding Views

Hezi Azatchi, Technion - Israel Institute of Technology,
Yossi Levanoni, Technion - Israel Institute of Technology,
Harel Paz, Technion - Israel Institute of Technology,
Erez Petrank, Technion - Israel Institute of Technology,

With concurrent and garbage collected languages like Java and C# becoming popular, the need for a suitable non-intrusive, efficient, and concurrent multiprocessor garbage collector has become acute. We propose a novel mark and sweep on-the-fly algorithm based on the sliding views mechanism of Levanoni and Petrank. We have implemented our collector on the Jikes Java Virtual Machine running on a Netfinity multiprocessor and compared it to the concurrent algorithm and to the stop-the-world collector supplied with Jikes JVM. The maximum pause time that we measured with our benchmarks over all runs was 2ms. In all runs, the pause times were smaller than those of the stop-the-world collector by two orders of magnitude and they were also always shorter than the pauses of the Jikes concurrent collector. Throughput measurements of the new garbage collector show that it outperforms the Jikes concurrent collector by up to 60%. As expected, the stop-the-world does better than the on-the-fly collectors with results showing about 10% difference.

On top of being an effective mark and sweep on-the-fly collector standing on its own, our collector may also be used as a backup collector (collecting cyclic data structures) for the Levanoni-Petrank reference counting collector. These two algorithms perfectly fit sharing the same allocator, a similar data structure, and a similar JVM interface.

9:30 - 10:00
Heap Compression for Memory-Constrained Java Environment

Guangyu Chen, The Pennsylvania State University,
Mahmut Kandemir, The Pennsylvania State University,
Naraya Vijaykrishnan, The Pennsylvania State University,
Janie Irwin, The Pennsylvania State University,
Bernd Mathiske, Sun Microsystems, Inc.,
Mario Wolczko, Sun Microsystems, Inc.,

Java is becoming the main software platform for consumer and embedded devices such as mobile phones, PDAs, TV set-top boxes, and in-vehicle systems. Since many of these systems are memory constrained, it is extremely important to keep the memory footprint of Java applications under control.

The goal of this work is to enable the execution of Java applications using a smaller heap footprint than that possible using current embedded JVMs. We propose a set of memory management strategies to reduce heap footprint of embedded Java applications that execute under severe memory constraints. Our first contribution is a new garbage collector, referred to as the Mark-Compact-Compress (MCC) collector, that allows an application to run with a heap smaller than its footprint. An important characteristic of this collector is that it compresses objects when heap compaction is not sufficient for creating space for the current allocation request. In addition to employing compression, we also consider a heap management strategy and associated garbage collector, called MCL (Mark-Compact-Lazy Allocate), based on lazy allocation of object portions. This new collector operates like the conventional Mark-Compact (MC) collector, but takes advantage of the observation that many Java applications create large objects, of which only a small portion is actually used. In addition, we also combine MCC and MCL, and present MCCL (Mark-Compact-Compress-Lazy Allocate), which outperforms both MCC and MCL.

We have implemented these collectors using KVM, and performed extensive experiments using a set of ten embedded Java applications. We have found our new garbage collection strategies to be useful in two main aspects. First, they reduce the minimum heap size necessary to execute an application without out-of-memory exception. Second, our strategies reduce the heap occupancy. That is, at a given time, they reduce the heap memory requirement of the application being executed. We have also conducted experiments with a more aggressive object compression strategy and discussed its main advantages.