Exploiting memory usage patterns to improve garbage collections in Java

  • Authors:
  • Liangliang Tong;Francis C. M. Lau

  • Affiliations:
  • The University of Hong Kong;The University of Hong Kong

  • Venue:
  • Proceedings of the 8th International Conference on the Principles and Practice of Programming in Java
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Copying-based garbage collectors are currently widely employed in JVM systems, as they provide not only cheap allocations but also fast collections. Comparing to their compacting-based counterparts, copying-based collectors trade space for time: they conservatively reserve half of the available heap for the purpose of copying live objects. It is a common belief, however, that objects' survival rates are generally too low to make full use of the reserved memory. We find through experiments that the total live object sizes of Java programs are generally small and remain relatively stable over many collections, which provides a perfect opportunity for optimization. We analyze this phenomenon and propose a "skew-space" collector that would reserve spaces of dynamically adjusted sizes coming from online predictions. The proposed collector has been realized using MMTk in the JikesRVM, and has shown promising improvements in the total execution time for the SPECjvm98 and DaCapo benchmarks.