Hoppa till huvudinnehållet
Institutionen för informationsteknologi

Improving Program Locality in the GC using Hotness

Albert Mingkun Yang, Uppsala University

Date and Time
May 8th 2020, 10:15 - 11:00

Zoom: https://uu-se.zoom.us/j/61827085769

The hierarchical memory system with increasingly small and
increasingly fast memory closer to the CPU has for long been at
the heart of hiding, or mitigating the performance gap between
memories and processors. To utilise this hardware, programs must
be written to exhibit good object locality. In languages like
C/C++, programmers can carefully plan how objects
should be laid out (albeit time consuming and error-prone); for
managed languages, especially ones with moving garbage
collectors, a manually created optimal layout may be destroyed
in the process of object relocation. For managed languages that
present an abstract view of memory, the solution lies in making
the garbage collector aware of object locality, and strive to
achieve and maintain good locality, even in the face of
multi-phased programs that exhibit different behaviour across
different phases.

This paper presents a GC design that dynamically reorganises
objects in the order mutators access them, and additionally
strives to separate frequently and infrequently used objects in
memory. This improves locality and the efficiency of hardware
prefetching. Identifying frequently used objects is done at
run-time, with small overhead. HCSGC also offers tunability,
e.g. for shifting relocation work towards mutators, or for more
or less aggressive object relocation.

The ideas are evaluated in the context of the ZGC collector on
OpenJDK and yields performance improvements of 5% (tradebeans),
9% (h2) and an impressive 25–45% (JGraphT), all with 95%
confidence. For SPECjbb, results are inconclusive due to a
fluctuating baseline.

Back to the seminar page

Uppdaterad  2020-05-06 17:01:09 av Albin Stjerna.