Automatic heap sizing: taking real memory into account

  • Authors:
  • Ting Yang;Matthew Hertz;Emery D. Berger;Scott F. Kaplan;J. Eliot B. Moss

  • Affiliations:
  • University of Massachusetts, Amherst, MA;University of Massachusetts, Amherst, MA;University of Massachusetts, Amherst, MA;Amherst College, Amherst, MA;University of Massachusetts, Amherst, MA

  • Venue:
  • Proceedings of the 4th international symposium on Memory management
  • Year:
  • 2004

Quantified Score

Hi-index 0.02

Visualization

Abstract

Heap size has a huge impact on the performance of garbage collected applications. A heap that barely meets the application's needs causes excessive GC overhead, while a heap that exceeds physical memory induces paging. Choosing the best heap size a priori is impossible in multiprogrammed environments, where physical memory allocations to processes change constantly. We present an automatic heap-sizing algorithm applicable to different garbage collectors with only modest changes. It relies on an analytical model and on detailed information from the virtual memory manager. The model characterizes the relation between collection algorithm, heap size, and footprint. The virtual memory manager tracks recent reference behavior, reporting the current footprint and allocation to the collector. The collector uses those values as inputs to its model to compute a heap size that maximizes throughput while minimizing paging. We show that our adaptive heap sizing algorithm can substantially reduce running time over fixed-sized heaps.