An Experimental Study on the Behavioural Tendencies of Objects Classified As Hot and Cold by a Java Virtual Machine Garbage Collector
2020 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE credits
Student thesisAlternative title
En experimentell studie av trender i beteende bland objekt klassificerade som heta och kalla av en skräpsamlare för Java virtual machine (Swedish)
Abstract [en]
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.
Abstract [sv]
En grundläggande hypotes för Java virtual machine skräpsamlaren ”ThinGC”, presenterad av Mingkun Yang m. fl. [1], en utveckling av Oracles ”ZGC”, är att ett nyttjande av eventuell temporal lokalitet skulle kunna optimisera skräp- samling genom att begränsa den totala mängden objekt som behöver behand- las. För att optimisera skräpsamling klassificerar ThinGC objekt som varma (dvs. nyligen refererade) eller kalla, separerar heta och kalla objekt i skilda minnesutrymmen, och skräpsamlar dessa minnesutrymmen separat med två skräpsamlare.
För att undersöka i vilken utsträckning denna temporala lokalitet faktiskt kan observeras, granskar denna uppsats beteende av objekt klassificerade som heta eller kalla av ThinGC. Undersökta beteenden inkluderar: tendens bland kalla objekt att förbli kalla, antal cykler objekt förväntas förbli kalla och om tendenser bland objekt att förbli heta eller kalla är relaterade till objekttyp.
För att kunna granska objekts beteenden loggas värmeinformation för al- la objekt i utvalda ”benchmarks” från benchmarksviten DaCapo under varje skräpsamlingscykel av ThinGC. Varje objekts värmeinformation kompileras sedan genom att följa vidarebefodringar av adresser, och till slut beräknas mä- tetal som uppskattar objektens beteende.
Analys av de diagram och tabeller som presenterar resultaten av beräkning- en av mätetalen visar, till exempel, att återuppvärmningar av objekt är säll- synta, att kalla objekt oftast håller sig stadigt kalla, och att kalla objekt oftast håller sig kalla längre än varma objekt håller sig varma.
Resultaten visar tydligt skilda beteenden för heta och kalla objekt och indi- kerar att konceptet att klassificera objekt efter värmeinformation och behandla heta och kalla objekt separat kan vara välgrundat.
Resultaten visar också att vissa objektklasser är mer eller mindre benägna att hålla sig kalla. Om dessa klassbeteenden kan visas vara pålitliga genom att undersöka en större mängd program skulle informationen kunna vara använd- bar som en baslinje för finjustering av skräpsamling. Om värmeinformation kan samlas, och liknande mätetal beräknas parallellt med exekvering, skulle denna information också kunna bistå skräpsamlaren med att ta direkta beslut.
Place, publisher, year, edition, pages
2020. , p. 78
Series
TRITA-EECS-EX ; 2020:190
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-277833OAI: oai:DiVA.org:kth-277833DiVA, id: diva2:1449632
External cooperation
Oracle Svenska AB
Educational program
Master of Science - Computer Science
Supervisors
Examiners
2020-06-302020-06-302022-06-26Bibliographically approved