An Experimental Study on the Behavioural Tendencies of Objects Classified As Hot and Cold by a Java Virtual Machine Garbage Collector

University essay from KTH/Skolan för elektroteknik och datavetenskap (EECS)

Author: Hanna Nyblom; [2020]

Keywords: ;

Abstract: A constitutive hypothesis of the Java Virtual Machine garbage collector ”ThinGC”, presented by Mingkun Yang et al. [1], an extension of Oracle’s ”ZGC”, is that capitalising on possible temporal locality could optimise collection by limiting the total number of objects to manage. To achieve GC optimisations, ThinGC classifies objects as hot (recently referenced) or cold, separates the hot and cold objects into distinct memory spaces, and collects the spaces separately using two garbage collectors. In order to examine to what extent this temporal locality can actually be observed, this thesis analyses the behaviour of objects classified as hot and cold by ThinGC. Reviewed behaviour includes: tendency of cold objects to remain cold, expected length of cold streaks, and if the tendency to remain hot or cold is related to the type of the object. In order to examine object behaviour, hotness information for all objects in selected benchmarks from the DaCapo benchmark suite is logged in each GC cycle of ThinGC. The hotness information of each object is then compiled following address forwardings, and metrics estimating the behaviour of each object is calculated. Analysis of the charts and tables presenting the results of the metric calcu- lations show for instance that ”reheats” of objects are uncommon, cold objects usually stay steadily cold, and long cold streaks are more common than long hot streaks. The results highlight distinctly different behaviours of hot and cold objects and indicate that the concept of classifying objects by hotness and treating cold objects separately could be well founded. The results also show some classes of objects being more or less likely to stay cold. If these class behaviours could eventually be proven to be reliable by examining a larger set of programs, the information could be useful as a baseline for GC tuning. Also, if hotness information were collected and similar metrics were calculated concurrently, this information could aid in live GC decision making.

  AT THIS PAGE YOU CAN DOWNLOAD THE WHOLE ESSAY. (follow the link to the next page)