Adaptive optimization of the Sun Java™ real-time system garbage collector

  • Authors:
  • Qian Zhu;David Vengerov

  • Affiliations:
  • Sun Microsystems Laboratories, Menlo Park, CA;Sun Microsystems Laboratories, Menlo Park, CA

  • Venue:
  • Adaptive optimization of the Sun Java™ real-time system garbage collector
  • Year:
  • 2009

Quantified Score

Hi-index 0.00

Visualization

Abstract

Garbage collection (GC) is one of the largest sources of unpredictability in Java™ applications, and 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 then 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. 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, which was integrated into the beta release of Java RTS 2.2. An experimental evaluation of this framework using the SPECjbb2005 benchmark confirmed its effectiveness. This framework can be used in conjunction with any concurrent or a time-based incremental garbage collector.