Sun and Oracle Community Voices How to Buy Log In United States [Change] English

»  Spotlight Articles
»  Projects
»  Publications
»  People
»  Awards
»  Events
»  Downloads
»  Internships
»  Contrarian Minds
»  About Sun Labs
Sun Labs - New Technical Report - Adaptive Optimization of the Sun Java Real-Time System Garbage Collector

New Sun Labs Technical Report:

Adaptive Optimization of the Sun Java Real-Time System Garbage Collector

by Qian Zhu, David Vengerov

Read Technical Report

September 15, 2009 -Garbage collection (GC) is one of the largest sources of unpredictability in Java applications. A real-time virtual machine must use garbage collection algorithms that minimize delays to real-time threads and at the same time maximize the overall application's throughput. In order to achieve the optimal tradeoff between these conflicting objectives, the GC cycle (which needs to take place periodically in order to free the memory no longer used by the application) needs to be triggered at the optimal time. If it is triggered too soon the application's throughput will decrease unnecessarily, while if it is triggered too late then the application can run out of free memory and block real-time threads unnecessarily.

The Sun Java Real-Time System (Java RTS) offers tools for specification, scheduling, and management of real-time applications. Starting with Sun Java RTS 2.0, a new real-time garbage collector (RTGC) is available. One of the key RTGC parameters is the StartupMemoryThreshold, which determines how low the free memory in the system can fall before a garbage collection is triggered. This paper presents a framework for dynamically adapting the StartupMemoryThreshold for achieving the optimal balance between the application's throughput and pause time, both for the case when the application's load is constant over time and when it changes over time.

Experimental evaluation of this framework was conducted using the SPECjbb2005 workload, and the results showed a noticeable improvement in the SPECjbb2005 throughput and an increased determinism, as no delay was caused by RTGC to the real-time threads. The proposed framework was integrated into the beta release of Java RTS 2.2, but it can also be used in conjunction with any concurrent or a time-based incremental garbage collector.