Skip to main content
Hyojeong Lee
Distributed Computing System Laboratory
Department of Computer Science and Engineering
Seoul National University, Korea
Design of Swap-aware Java Virtual
Machine Garbage Collector Policy
 Using simple validation workload to verify the impaction of
system swap during JVM Garbage Collection
 The objects that swapped out from the memory could be the
target to compact or garbage collect selected by the Parallel
Compact Collector
 Suggest two solutions
 Using an LRU list to manage accessed objects and using it to
screen out the swapped out objects from Compaction/GC targets.
 Analyze the object swapness via the information of Linux
Pagemap during summary phase and distinguish them from
Compaction/GC target
Table of Contents
Evaluation for SWAP impact on JVM Garbage Collection
Heap size = 105 GB
Object size = 1 GB
Swap starts after 50 objects allocated
GC starts after 70 objects allocated
Parallel Compactor Collector & SWAP
Status of regions before compaction
Regions status after Compaction
Compaction
Region
Region
Swapped out
LRU Based Swap management
Region
1 2 3 4 5 6 7 8
LRUMRU
8 7 5
Check swappiness of object when
executing GCGarbage
Collection
(1) Marking
(2) Summary
(3)
Compaction
for each (space)
for each (region)
summarize liveness of region
for each (object)
for each (page)
/* using I/O related page flag */
count # of swapped pages
calculate swapness of region
determine dense-prefix using liveness & swapness
Check swappiness of object when executing GC
Features of workloads
- High Memory usage
- High opportunity to make swap happen
- High Locality
- Continuous objects are selected as GC target
- Target workload
- Sparkbench: SVDPlusPlus / Logistic Regression
Evaluation Plan: workload features
Workload Features
Memory usage of Sparkbench
Page fault of Sparkbench
PageRank/vanilla
LogisticRegression/vanilla
SVM/vanilla
SVDPlusPlus/vanilla
 We clarify the problem that current JVM GC policies are not
aware of linux system level swap.
 We proposed 2 solutions
 Using LRU list to management swapped objects.
 Using LINUX pagemap info to screen out swapped objects.
 We Selected a real workload with the same feature of our
validate program.
 We plan to implement our solutions and evaluate them on our
selected target workload.
Conclusion
Q&A
BACKUP
Backup Slides
Marking phase
1 1 1 1111 1111 1 1 1 1 1111 1111 1bitmap
Summary_phase
Traverse the whose space
to pick up regions might be
compacted
Source_reg = cur
dest_addr = addr
Live_size = own size
…
Source_reg = k+i
dest_addr = x
Live_size = 0
…
x
k
Source_reg = 0
dest_addr = x+size *k
Live_size = size
…
Summary_phase
Looking for the last region
that contains live data
Binary search
full_cp
Summary_phase
Looking for the limited
region with specific size of
dead wood from full_cp
• Density = live_data / capacity (==0.71)
• Limited_dead_wood = Normal_distribution(density) * capacity
(== 3GB)
Summary_phase
Looking for the last region
that contains live data
full_cp
Binary
search
limited_cp
Limited_dead_wood
compact_phase
Looking for the last region
that contains live data
best_cp(with max reclaim ration)
Aka:dense_prefix
Compact regions
compact_phase
Looking for the last region
that contains live data
Bottom top End