SlideShare a Scribd company logo
Garbage First Garbage
Collector: Where The
Rubber Meets The Road!
-By Monica Beckwith
Code Karam LLC
@mon_beck; monica@codekaram.com
1
©2017 CodeKaram
About me
• Java performance engineer
• President @Code Karam LLC
• Partner @Extreme Performance Experts
• I have worked with Oracle, Sun, AMD …
• I used to work in the capacity of G1 GC
performance lead @Oracle.
2
©2017 CodeKaram
Agenda
• Background on G1 GC
• Heap regions - Regular and Humongous
• Additional data structures
• G1 GC phases
3
©2017 CodeKaram
Agenda
• Tuning considerations with G1 GC
• Taming mixed GCs
• Components of a G1 GC pause
• Humongous object requirements
• Fragmentation
• Evacuation failures
• Allocation rate and promotion rate
4
G1 GC Background
5
Regionalized Heap
6
©2017 CodeKaram
Traditional Java Heap
7
Contiguous Java Heap
Eden S0 S1
Old
Generation
©2017 CodeKaram
Garbage First GC - Heap
Regions
8
Contiguous Java Heap
Free
Region
Non-Free
Region
©2017 CodeKaram
G1 GC Heap Regions
• Young Regions - Regions that contain objects in
the Eden and Survivor Spaces
• Old Regions - Regions that contain objects in
the Old generation.
• Humongous Regions - Regions that contain
Humongous Objects.
9
©2017 CodeKaram
Eden
Old Old
Eden
Old
Survivor
Humongous
10
Garbage First GC - Heap
Regions
Humongous Objects
11
©2017 CodeKaram
Humongous Objects
12
An old generation region
A young generation region
©2017 CodeKaram
Humongous Objects
13
Object < 50% of
G1 region size
Object >= 50% of
G1 region size
Object > G1
region size
??
©2017 CodeKaram14
Object < 50% of
G1 region size
Humongous Objects
©2017 CodeKaram15
Object >= 50% of
G1 region size
Humongous Objects
©2017 CodeKaram16
Object > G1
region size
Humongous Objects
©2017 CodeKaram17
Object NOT Humongous
Object Humongous
Object Humongous ->
Needs Contiguous Regions
Humongous Objects
G1 GC Maintenance
18
Collection Set
19
©2017 CodeKaram
Collection Set
• A young collection set (CSet) will incorporate all
the young regions
• A mixed collection set will incorporate all the
young regions and a few candidate old regions
based on the “most garbage first” principle.
20
©2017 CodeKaram
Eden
Old Old
Eden
Old
Surv
ivor
CSet during a young collection -
21
Collection Set
©2017 CodeKaram
Old Old
Old
CSet during a mixed collection -
Sur
viv
or
Ol
d
Eden Eden
22
Collection Set
Remembered Sets
23
©2017 CodeKaram
Remembered Sets
• Additional data structures to help with
maintenance
• Add a slight footprint overhead (~5%)
24
©2017 CodeKaram
• Maintain and track incoming references into its
region
• old-to-young references
• old-to-old references
• Remembered sets have varying granularity
based on the “popularity” of objects or regions.
25
Remembered Sets
©2017 CodeKaram26
Figure 2.3 Remembered sets with incoming object references**
<insert G1-Deep-Dive-Figure-3.tif>
empty region young region old region
incoming reference into a region
incoming reference into an RSet’s owning region
RSet for Region y
RSet for Region z
Region z
Region x Region y
RSet for Region x
<insert G1-Deep-Dive-Figure-3.tif>
Figure G1-Deep-Dive-Figure-3: RSet example for one young and two old regions.
G1 GC has its way of handling such demands of popularity and it does so by changing the
density of RSets. The density of RSets follow three levels of granularity namely; sparse, fine and
coarse. For a popular region, the RSet would probably get coarsened to accommodate the pointers
from various other regions. This will be reflected in the RSet scanning time for those regions.
LEGENDS
empty region young region old region
incoming reference into a region
incoming reference into an RSet’s owning region
RSet for Region y
RSet for Region z
Region z
Region x Region y
RSet for Region x
G1 GC Phases
27
©2017 CodeKaram
G1 GC - Pause Histogram
28
Pausetimeinmilliseconds
0
30
60
90
120
Timestamps
3415 3416.3 3417.2 3418.4 3419 3422 3423.4 3432.2 3433.2 3436.8 3437.6 3438.9 3440
Young Collection Initial Mark Remark Cleanup Mixed Collection
Occupancy == Initiating Heap Occupancy Percent
A Young Collection
29
©2017 CodeKaram
The Garbage First Collector
Eden
Old Old
Eden
Old
Surv
ivor
E.g.: Current heap configuration -
30
©2017 CodeKaram
The Garbage First Collector
Eden
Old Old
Eden
Old
Surv
ivor
E.g.: During a young collection -
31
©2017 CodeKaram
The Garbage First Collector
Old Old
Old
E.g.: After a young collection -
Sur
viv
or
Ol
d
32
©2017 CodeKaram
Old Old
Old
Sur
viv
or
Ol
d
Eden Eden
Old
The Garbage First Collector
33
E.g.: Current heap configuration -
Marking Initiation
34
©2017 CodeKaram
Initiating Heap Occupancy
Percent
35
• Threshold to start the concurrent marking cycle
to identify candidate old regions.
• When old generation occupancy crosses this
adaptive threshold.
• Based on the total heap size.
©2017 CodeKaram
Initiating Heap Occupancy
Percent - Helpful Options
36
• -XX:InitiatingHeapOccupancyPercent=<p>
• -XX:ConcGCThreads=<n>
The Concurrent
Marking Stages
37
©2017 CodeKaram
Stages of Concurrent
Marking
38
• Initial-mark
• Root region scan
• Concurrent mark
• Remark / Final mark
• Cleanup
©2017 CodeKaram
Class Unloading with
Concurrent Mark
• With JDK 8 update 40, you have
ClassUnloadingWithConcurrentMark, and
unreachable classes can be unloaded during
Remark.
39
©2017 CodeKaram
Old Old
Old
E.g.: Reclamation of a garbage-filled region
during the cleanup phase -
Sur
viv
or
Ol
d
Eden Eden
Old
The Garbage First Collector
40
©2017 CodeKaram
Old Old
Old
E.g.: Reclamation of a garbage-filled region
during the cleanup phase -
Sur
viv
or
Ol
d
Eden Eden
The Garbage First Collector
41
Incremental Compaction
aka Mixed Collection
42
©2017 CodeKaram
Old Old
Old
E.g.: Current heap configuration -
Sur
viv
or
Ol
d
Eden Eden
The Garbage First Collector
43
©2017 CodeKaram
Old Old
Old
E.g.: During a mixed collection -
Sur
viv
or
Ol
d
Eden Eden
The Garbage First Collector
44
©2017 CodeKaram
Old
E.g.: After a mixed collection -
O
l
d
Sur
vivo
r
Old
The Garbage First Collector
45
Tuning Considerations
with G1 GC
46
Taming Mixed GCs
47
©2017 CodeKaram
Say,
The young collections are meeting your SLAs,
but…
The mixed collections are far too frequent and
too many
OR
The mixed collections are blowing your SLAs
48
Why Tame Mixed
Collections?
©2017 CodeKaram49
©2017 CodeKaram
If meeting the latency SLA is your only concern:
Divide the expensive collection further into
smaller inexpensive collections
50
What Can We Do?
©2017 CodeKaram
Adjusting Each Mixed
Collection
51
Minimum number of old regions to
be included in the mixed collection
set.
Maximum number of old regions to
be included in the mixed collection
set.
©2017 CodeKaram
Adjusting Each Mixed
Collection
52
-XX:G1MixedGCCountTarget=<n>
-XX:G1OldCSetRegionThresholdPercent=<p>
©2017 CodeKaram
If the GC overhead is too high and you have heap
to spare (after considering your humongous
objects requirements):
Remove the expensive regions from your
collection set
53
What Can We Do?
©2017 CodeKaram
Eliminating Expensive Old
Regions From Mixed Collections
• You could eliminate based on the liveness per
old region
• You could also eliminate expensive old regions
towards the end of the sorted array
54
©2017 CodeKaram
Eliminating Expensive Old
Regions From Mixed Collections
• -XX:G1MixedGCLiveThresholdPercent = <p>
• -XX:G1HeapWastePercent = <p>
55
Components of a G1
GC Pause
56
©2017 CodeKaram57
©2017 CodeKaram
Ideally, you will see that most of your pause
time is spent in copying live objects…
58
Major Contributor?
©2017 CodeKaram59
©2017 CodeKaram
but, what if that’s not the case?
60
Major Contributor?
61
©2017 CodeKaram
, 0.4066560 secs]
[Parallel Time: 354.9 ms, GC Workers: 48]
[GC Worker Start (ms): Min: 4500060.2, Avg: 4500068.1, Max: 4500085.2, Diff: 24.9]
[Ext Root Scanning (ms): Min: 0.0, Avg: 4.8, Max: 31.8, Diff: 31.8, Sum: 231.0]
[Update RS (ms): Min: 0.0, Avg: 21.6, Max: 116.3, Diff: 116.3, Sum: 1036.3]
[Processed Buffers: Min: 0, Avg: 4.9, Max: 29, Diff: 29, Sum: 234]
[Scan RS (ms): Min: 0.0, Avg: 41.5, Max: 62.3, Diff: 62.2, Sum: 1992.1]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.3]
[Object Copy (ms): Min: 195.6, Avg: 233.1, Max: 261.1, Diff: 65.5, Sum: 11189.0]
[Termination (ms): Min: 21.0, Avg: 45.6, Max: 74.4, Diff: 53.4, Sum: 2188.5]
[GC Worker Other (ms): Min: 0.0, Avg: 0.1, Max: 0.2, Diff: 0.2, Sum: 4.8]
[GC Worker Total (ms): Min: 329.6, Avg: 346.7, Max: 354.7, Diff: 25.1, Sum: 16642.0]
[GC Worker End (ms): Min: 4500414.7, Avg: 4500414.8, Max: 4500415.0, Diff: 0.2]
62
©2017 CodeKaram
[Code Root Fixup: 0.1 ms]
[Code Root Migration: 0.2 ms]
[Clear CT: 1.4 ms]
[Other: 50.1 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 34.6 ms]
[Ref Enq: 0.3 ms]
[Free CSet: 7.5 ms]
63
©2017 CodeKaram
[Code Root Fixup: 0.1 ms]
[Code Root Migration: 0.2 ms]
[Clear CT: 1.4 ms]
[Other: 50.1 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 34.6 ms]
[Ref Enq: 0.3 ms]
[Free CSet: 7.5 ms]
64
©2017 CodeKaram
, 0.4066560 secs]
[Parallel Time: 354.9 ms, GC Workers: 48]
[GC Worker Start (ms): Min: 4500060.2, Avg: 4500068.1, Max: 4500085.2, Diff: 24.9]
[Ext Root Scanning (ms): Min: 0.0, Avg: 4.8, Max: 31.8, Diff: 31.8, Sum: 231.0]
[Update RS (ms): Min: 0.0, Avg: 21.6, Max: 116.3, Diff: 116.3, Sum: 1036.3]
[Processed Buffers: Min: 0, Avg: 4.9, Max: 29, Diff: 29, Sum: 234]
[Scan RS (ms): Min: 0.0, Avg: 41.5, Max: 62.3, Diff: 62.2, Sum: 1992.1]
[Code Root Scanning (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.3]
[Object Copy (ms): Min: 195.6, Avg: 233.1, Max: 261.1, Diff: 65.5, Sum:
11189.0]
[Termination (ms): Min: 21.0, Avg: 45.6, Max: 74.4, Diff: 53.4, Sum: 2188.5]
[GC Worker Other (ms): Min: 0.0, Avg: 0.1, Max: 0.2, Diff: 0.2, Sum: 4.8]
[GC Worker Total (ms): Min: 329.6, Avg: 346.7, Max: 354.7, Diff: 25.1, Sum: 16642.0]
[GC Worker End (ms): Min: 4500414.7, Avg: 4500414.8, Max: 4500415.0, Diff: 0.2]
65
66
Plot Showing Max Times
67
Plot Showing Avg Times
Humongous Objects
Requirements
68
©2017 CodeKaram
Ideally, humongous objects are few in
number and are short lived.
A lot of long-lived humongous objects can
cause evacuation failures since humongous
regions add to the old generation occupancy.
69
Humongous Objects
©2017 CodeKaram70
Object NOT Humongous
Object Humongous
Object Humongous ->
Needs Contiguous Regions
Humongous Objects
©2017 CodeKaram
Humongous Objects:
• Are allocated out of the old generation
• Are not moved
*Note: Since JDK8 update 40, they can be
collected during a young collection
71
So, What Did We Observe?
©2017 CodeKaram72
Object NOT Humongous
Object Humongous
Object Humongous ->
Needs Contiguous Regions
Wasted
Space!
Humongous Objects
©2017 CodeKaram
Humongous objects can pose the following issues:
Wasted space
Evacuation failures due to not having enough
(to-space) regions
73
So, What Did We Observe?
Fragmentation In The
G1 Collector
74
©2017 CodeKaram
• G1 GC is designed to “absorb” some
fragmentation.
• Default is 5% of the total Java heap
• Tradeoff so that expensive regions are left out.
G1 Heap Waste Percentage
75
©2017 CodeKaram
G1 Mixed GC (Region)
Liveness Threshold
76
• G1 GC’s old regions are also designed to
“absorb” some fragmentation.
• Default is 85% liveness in a G1 region.
• Tradeoff so that expensive regions are left out.
©2017 CodeKaram
Humongous Objects
77
• Wasted space!
• External fragmentation!
©2017 CodeKaram
Humongous Objects
78
• Wasted space!
• External fragmentation!
©2017 CodeKaram
Fragmentation Can Lead To
Evacuation Failures!
79
Promotion/Evacuation
Failures In The G1
Collector
80
©2017 CodeKaram
Evacuation Failures
81
276.731: [GC pause (G1 Evacuation Pause) (young) (to-space exhausted),
0.8272932 secs]
[Parallel Time: 387.0 ms, GC Workers: 8]
<snip>
[Code Root Fixup: 0.1 ms]
[Code Root Purge: 0.0 ms]
[Clear CT: 0.2 ms]
[Other: 440.0 ms]
[Evacuation Failure: 437.5 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 0.1 ms]
[Ref Enq: 0.0 ms]
[Redirty Cards: 0.9 ms]
[Humongous Reclaim: 0.0 ms]
[Free CSet: 0.9 ms]
[Eden: 831.0M(900.0M)->0.0B(900.0M) Survivors: 0.0B->0.0B Heap: 1020.1M(1024.0M)-
>1020.1M(1024.0M)]
[Times: user=3.64 sys=0.20, real=0.83 secs]
**
©2017 CodeKaram
• When there are no more regions available for
survivors or tenured objects, G1 GC encounters
an evacuation failure.
• An evacuation failure is expensive and the usual
pattern is that if you see a couple of evacuation
failures; full GC could* soon follow.
82
Evacuation Failures
©2017 CodeKaram
A heavily tuned JVM command line
may be restricting the G1 GC
ergonomics and adaptability.
Start with just your heap sizes and a
reasonable pause time goal
83
Avoiding Evacuation
Failures
©2017 CodeKaram
Your live data set + long live
transient data may be too large for
the old generation
Check LDS+ and increase heap to
accommodate everything in the old
generation.
84
Avoiding Evacuation
Failures
©2017 CodeKaram
Initiating Heap Occupancy Threshold
could be the issue.
Check IHOP and make sure it accommodates
the LDS+.
IHOP threshold too high -> Delayed marking ->
Delayed incremental compaction -> Evacuation
Failures!
85
Avoiding Evacuation
Failures
©2017 CodeKaram
Marking Cycle could be taking too
long to complete?
Increase concurrent marking threads
Reduce IHOP
86
Avoiding Evacuation
Failures
©2017 CodeKaram
to-space survivors are the problem?
Increase the G1ReservePercent, if to-space
survivors are triggering the evacuation
failures!
87
Avoiding Evacuation
Failures
88
89
90
©2017 CodeKaram
• 487.817: [G1Ergonomics (Heap Sizing) attempt heap
expansion, reason: region allocation request failed, allocation
request: 524280 bytes]
• 487.817: [G1Ergonomics (Heap Sizing) expand the heap,
requested expansion amount: 524280 bytes, attempted
expansion amount: 1048576 bytes]
• 487.817: [G1Ergonomics (Heap Sizing) did not expand the
heap, reason: heap already fully expanded]
• 487.888: [G1Ergonomics (Heap Sizing) attempt heap
expansion, reason: recent GC overhead higher than threshold
after GC, recent GC overhead: 28.40 %, threshold: 10.00 %,
uncommitted: 0 bytes, calculated expansion amount: 0 bytes
(20.00 %)]
91
©2017 CodeKaram
• 487.817: [G1Ergonomics (Heap Sizing) attempt heap
expansion, reason: region allocation request failed, allocation
request: 524280 bytes]
• 487.817: [G1Ergonomics (Heap Sizing) expand the heap,
requested expansion amount: 524280 bytes, attempted
expansion amount: 1048576 bytes]
• 487.817: [G1Ergonomics (Heap Sizing) did not expand the
heap, reason: heap already fully expanded]
• 487.888: [G1Ergonomics (Heap Sizing) attempt heap
expansion, reason: recent GC overhead higher than threshold
after GC, recent GC overhead: 28.40 %, threshold: 10.00 %,
uncommitted: 0 bytes, calculated expansion amount: 0 bytes
(20.00 %)]
92
93
Allocation and
Promotion Rates
94
©2017 CodeKaram
Plot Allocation & Promotion
Rates
95
©2017 CodeKaram96
Young Occupancy before GC Young Gen Size Old Gen Occupancy after GC
Heap Occupancy before GC Heap Occupancy after GC Heap Size
Timestamps

More Related Content

What's hot

Understanding DPDK algorithmics
Understanding DPDK algorithmicsUnderstanding DPDK algorithmics
Understanding DPDK algorithmics
Denys Haryachyy
 
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBaseHBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon
 
Raffi Krikorian, Twitter Timelines at Scale
Raffi Krikorian, Twitter Timelines at ScaleRaffi Krikorian, Twitter Timelines at Scale
Raffi Krikorian, Twitter Timelines at Scale
Mariano Amartino
 
ジョークRFC紹介
ジョークRFC紹介ジョークRFC紹介
ジョークRFC紹介
miki koganei
 
Георгий Зайцев - Reversing golang
Георгий Зайцев - Reversing golangГеоргий Зайцев - Reversing golang
Георгий Зайцев - Reversing golang
DefconRussia
 
DPDK KNI interface
DPDK KNI interfaceDPDK KNI interface
DPDK KNI interface
Denys Haryachyy
 
Linux Binary Exploitation - Return-oritend Programing
Linux Binary Exploitation - Return-oritend ProgramingLinux Binary Exploitation - Return-oritend Programing
Linux Binary Exploitation - Return-oritend Programing
Angel Boy
 
Spark Tuning for Enterprise System Administrators By Anya Bida
Spark Tuning for Enterprise System Administrators By Anya BidaSpark Tuning for Enterprise System Administrators By Anya Bida
Spark Tuning for Enterprise System Administrators By Anya Bida
Spark Summit
 
Efficient Data Storage for Analytics with Apache Parquet 2.0
Efficient Data Storage for Analytics with Apache Parquet 2.0Efficient Data Storage for Analytics with Apache Parquet 2.0
Efficient Data Storage for Analytics with Apache Parquet 2.0Cloudera, Inc.
 
Binary exploitation - AIS3
Binary exploitation - AIS3Binary exploitation - AIS3
Binary exploitation - AIS3
Angel Boy
 
Intel dpdk Tutorial
Intel dpdk TutorialIntel dpdk Tutorial
Intel dpdk Tutorial
Saifuddin Kaijar
 
OpenJDK Concurrent Collectors
OpenJDK Concurrent CollectorsOpenJDK Concurrent Collectors
OpenJDK Concurrent Collectors
Monica Beckwith
 
twlkh-linux-vsyscall-and-vdso
twlkh-linux-vsyscall-and-vdsotwlkh-linux-vsyscall-and-vdso
twlkh-linux-vsyscall-and-vdso
Viller Hsiao
 
Getting Started with HBase
Getting Started with HBaseGetting Started with HBase
Getting Started with HBase
Carol McDonald
 
MacOS memory allocator (libmalloc) Exploitation
MacOS memory allocator (libmalloc) ExploitationMacOS memory allocator (libmalloc) Exploitation
MacOS memory allocator (libmalloc) Exploitation
Angel Boy
 
New Ways to Find Latency in Linux Using Tracing
New Ways to Find Latency in Linux Using TracingNew Ways to Find Latency in Linux Using Tracing
New Ways to Find Latency in Linux Using Tracing
ScyllaDB
 
Advanced heap exploitaion
Advanced heap exploitaionAdvanced heap exploitaion
Advanced heap exploitaion
Angel Boy
 
Sigreturn Oriented Programming
Sigreturn Oriented ProgrammingSigreturn Oriented Programming
Sigreturn Oriented Programming
Angel Boy
 
Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0
Ceph Community
 
File Format Benchmark - Avro, JSON, ORC & Parquet
File Format Benchmark - Avro, JSON, ORC & ParquetFile Format Benchmark - Avro, JSON, ORC & Parquet
File Format Benchmark - Avro, JSON, ORC & Parquet
DataWorks Summit/Hadoop Summit
 

What's hot (20)

Understanding DPDK algorithmics
Understanding DPDK algorithmicsUnderstanding DPDK algorithmics
Understanding DPDK algorithmics
 
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBaseHBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
 
Raffi Krikorian, Twitter Timelines at Scale
Raffi Krikorian, Twitter Timelines at ScaleRaffi Krikorian, Twitter Timelines at Scale
Raffi Krikorian, Twitter Timelines at Scale
 
ジョークRFC紹介
ジョークRFC紹介ジョークRFC紹介
ジョークRFC紹介
 
Георгий Зайцев - Reversing golang
Георгий Зайцев - Reversing golangГеоргий Зайцев - Reversing golang
Георгий Зайцев - Reversing golang
 
DPDK KNI interface
DPDK KNI interfaceDPDK KNI interface
DPDK KNI interface
 
Linux Binary Exploitation - Return-oritend Programing
Linux Binary Exploitation - Return-oritend ProgramingLinux Binary Exploitation - Return-oritend Programing
Linux Binary Exploitation - Return-oritend Programing
 
Spark Tuning for Enterprise System Administrators By Anya Bida
Spark Tuning for Enterprise System Administrators By Anya BidaSpark Tuning for Enterprise System Administrators By Anya Bida
Spark Tuning for Enterprise System Administrators By Anya Bida
 
Efficient Data Storage for Analytics with Apache Parquet 2.0
Efficient Data Storage for Analytics with Apache Parquet 2.0Efficient Data Storage for Analytics with Apache Parquet 2.0
Efficient Data Storage for Analytics with Apache Parquet 2.0
 
Binary exploitation - AIS3
Binary exploitation - AIS3Binary exploitation - AIS3
Binary exploitation - AIS3
 
Intel dpdk Tutorial
Intel dpdk TutorialIntel dpdk Tutorial
Intel dpdk Tutorial
 
OpenJDK Concurrent Collectors
OpenJDK Concurrent CollectorsOpenJDK Concurrent Collectors
OpenJDK Concurrent Collectors
 
twlkh-linux-vsyscall-and-vdso
twlkh-linux-vsyscall-and-vdsotwlkh-linux-vsyscall-and-vdso
twlkh-linux-vsyscall-and-vdso
 
Getting Started with HBase
Getting Started with HBaseGetting Started with HBase
Getting Started with HBase
 
MacOS memory allocator (libmalloc) Exploitation
MacOS memory allocator (libmalloc) ExploitationMacOS memory allocator (libmalloc) Exploitation
MacOS memory allocator (libmalloc) Exploitation
 
New Ways to Find Latency in Linux Using Tracing
New Ways to Find Latency in Linux Using TracingNew Ways to Find Latency in Linux Using Tracing
New Ways to Find Latency in Linux Using Tracing
 
Advanced heap exploitaion
Advanced heap exploitaionAdvanced heap exploitaion
Advanced heap exploitaion
 
Sigreturn Oriented Programming
Sigreturn Oriented ProgrammingSigreturn Oriented Programming
Sigreturn Oriented Programming
 
Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0Performance optimization for all flash based on aarch64 v2.0
Performance optimization for all flash based on aarch64 v2.0
 
File Format Benchmark - Avro, JSON, ORC & Parquet
File Format Benchmark - Avro, JSON, ORC & ParquetFile Format Benchmark - Avro, JSON, ORC & Parquet
File Format Benchmark - Avro, JSON, ORC & Parquet
 

Similar to Garbage First Garbage Collector: Where the Rubber Meets the Road!

The Performance Engineer's Guide to Java (HotSpot) Virtual Machine
The Performance Engineer's Guide to Java (HotSpot) Virtual MachineThe Performance Engineer's Guide to Java (HotSpot) Virtual Machine
The Performance Engineer's Guide to Java (HotSpot) Virtual Machine
Monica Beckwith
 
Game of Performance: A Song of JIT and GC
Game of Performance: A Song of JIT and GCGame of Performance: A Song of JIT and GC
Game of Performance: A Song of JIT and GC
Monica Beckwith
 
The Performance Engineer's Guide To (OpenJDK) HotSpot Garbage Collection - Th...
The Performance Engineer's Guide To (OpenJDK) HotSpot Garbage Collection - Th...The Performance Engineer's Guide To (OpenJDK) HotSpot Garbage Collection - Th...
The Performance Engineer's Guide To (OpenJDK) HotSpot Garbage Collection - Th...
Monica Beckwith
 
淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展
Leon Chen
 
G1 collector and tuning and Cassandra
G1 collector and tuning and CassandraG1 collector and tuning and Cassandra
G1 collector and tuning and Cassandra
Chris Lohfink
 
Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!
Monica Beckwith
 
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxDataOptimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
InfluxData
 
GC Tuning Confessions Of A Performance Engineer - Improved :)
GC Tuning Confessions Of A Performance Engineer - Improved :)GC Tuning Confessions Of A Performance Engineer - Improved :)
GC Tuning Confessions Of A Performance Engineer - Improved :)
Monica Beckwith
 
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCHadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Erik Krogen
 
1404 app dev series - session 8 - monitoring & performance tuning
1404   app dev series - session 8 - monitoring & performance tuning1404   app dev series - session 8 - monitoring & performance tuning
1404 app dev series - session 8 - monitoring & performance tuningMongoDB
 
The Performance Engineer's Guide To HotSpot Just-in-Time Compilation
The Performance Engineer's Guide To HotSpot Just-in-Time CompilationThe Performance Engineer's Guide To HotSpot Just-in-Time Compilation
The Performance Engineer's Guide To HotSpot Just-in-Time Compilation
Monica Beckwith
 
JFokus Java 9 contended locking performance
JFokus Java 9 contended locking performanceJFokus Java 9 contended locking performance
JFokus Java 9 contended locking performance
Monica Beckwith
 
G1GC
G1GCG1GC
G1GC
koji lin
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issues
Sergey Podolsky
 
Moving Toward Deep Learning Algorithms on HPCC Systems
Moving Toward Deep Learning Algorithms on HPCC SystemsMoving Toward Deep Learning Algorithms on HPCC Systems
Moving Toward Deep Learning Algorithms on HPCC Systems
HPCC Systems
 
Everything I Ever Learned About JVM Performance Tuning @Twitter
Everything I Ever Learned About JVM Performance Tuning @TwitterEverything I Ever Learned About JVM Performance Tuning @Twitter
Everything I Ever Learned About JVM Performance Tuning @Twitter
Attila Szegedi
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
Vladislav Gangan
 
GC Tuning Confessions Of A Performance Engineer
GC Tuning Confessions Of A Performance EngineerGC Tuning Confessions Of A Performance Engineer
GC Tuning Confessions Of A Performance Engineer
Monica Beckwith
 
Data Warehousing with Amazon Redshift
Data Warehousing with Amazon RedshiftData Warehousing with Amazon Redshift
Data Warehousing with Amazon Redshift
Amazon Web Services
 
ZGC-SnowOne.pdf
ZGC-SnowOne.pdfZGC-SnowOne.pdf
ZGC-SnowOne.pdf
Monica Beckwith
 

Similar to Garbage First Garbage Collector: Where the Rubber Meets the Road! (20)

The Performance Engineer's Guide to Java (HotSpot) Virtual Machine
The Performance Engineer's Guide to Java (HotSpot) Virtual MachineThe Performance Engineer's Guide to Java (HotSpot) Virtual Machine
The Performance Engineer's Guide to Java (HotSpot) Virtual Machine
 
Game of Performance: A Song of JIT and GC
Game of Performance: A Song of JIT and GCGame of Performance: A Song of JIT and GC
Game of Performance: A Song of JIT and GC
 
The Performance Engineer's Guide To (OpenJDK) HotSpot Garbage Collection - Th...
The Performance Engineer's Guide To (OpenJDK) HotSpot Garbage Collection - Th...The Performance Engineer's Guide To (OpenJDK) HotSpot Garbage Collection - Th...
The Performance Engineer's Guide To (OpenJDK) HotSpot Garbage Collection - Th...
 
淺談 Java GC 原理、調教和 新發展
淺談 Java GC 原理、調教和新發展淺談 Java GC 原理、調教和新發展
淺談 Java GC 原理、調教和 新發展
 
G1 collector and tuning and Cassandra
G1 collector and tuning and CassandraG1 collector and tuning and Cassandra
G1 collector and tuning and Cassandra
 
Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!Java 9: The (G1) GC Awakens!
Java 9: The (G1) GC Awakens!
 
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxDataOptimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
Optimizing InfluxDB Performance in the Real World | Sam Dillard | InfluxData
 
GC Tuning Confessions Of A Performance Engineer - Improved :)
GC Tuning Confessions Of A Performance Engineer - Improved :)GC Tuning Confessions Of A Performance Engineer - Improved :)
GC Tuning Confessions Of A Performance Engineer - Improved :)
 
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCHadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
 
1404 app dev series - session 8 - monitoring & performance tuning
1404   app dev series - session 8 - monitoring & performance tuning1404   app dev series - session 8 - monitoring & performance tuning
1404 app dev series - session 8 - monitoring & performance tuning
 
The Performance Engineer's Guide To HotSpot Just-in-Time Compilation
The Performance Engineer's Guide To HotSpot Just-in-Time CompilationThe Performance Engineer's Guide To HotSpot Just-in-Time Compilation
The Performance Engineer's Guide To HotSpot Just-in-Time Compilation
 
JFokus Java 9 contended locking performance
JFokus Java 9 contended locking performanceJFokus Java 9 contended locking performance
JFokus Java 9 contended locking performance
 
G1GC
G1GCG1GC
G1GC
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issues
 
Moving Toward Deep Learning Algorithms on HPCC Systems
Moving Toward Deep Learning Algorithms on HPCC SystemsMoving Toward Deep Learning Algorithms on HPCC Systems
Moving Toward Deep Learning Algorithms on HPCC Systems
 
Everything I Ever Learned About JVM Performance Tuning @Twitter
Everything I Ever Learned About JVM Performance Tuning @TwitterEverything I Ever Learned About JVM Performance Tuning @Twitter
Everything I Ever Learned About JVM Performance Tuning @Twitter
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
 
GC Tuning Confessions Of A Performance Engineer
GC Tuning Confessions Of A Performance EngineerGC Tuning Confessions Of A Performance Engineer
GC Tuning Confessions Of A Performance Engineer
 
Data Warehousing with Amazon Redshift
Data Warehousing with Amazon RedshiftData Warehousing with Amazon Redshift
Data Warehousing with Amazon Redshift
 
ZGC-SnowOne.pdf
ZGC-SnowOne.pdfZGC-SnowOne.pdf
ZGC-SnowOne.pdf
 

More from Monica Beckwith

The ilities of software engineering.pptx
The ilities of software engineering.pptxThe ilities of software engineering.pptx
The ilities of software engineering.pptx
Monica Beckwith
 
QCon London.pdf
QCon London.pdfQCon London.pdf
QCon London.pdf
Monica Beckwith
 
Enabling Java: Windows on Arm64 - A Success Story!
Enabling Java: Windows on Arm64 - A Success Story!Enabling Java: Windows on Arm64 - A Success Story!
Enabling Java: Windows on Arm64 - A Success Story!
Monica Beckwith
 
Applying Concurrency Cookbook Recipes to SPEC JBB
Applying Concurrency Cookbook Recipes to SPEC JBBApplying Concurrency Cookbook Recipes to SPEC JBB
Applying Concurrency Cookbook Recipes to SPEC JBB
Monica Beckwith
 
Intro to Garbage Collection
Intro to Garbage CollectionIntro to Garbage Collection
Intro to Garbage Collection
Monica Beckwith
 
OPENJDK: IN THE NEW AGE OF CONCURRENT GARBAGE COLLECTORS
OPENJDK: IN THE NEW AGE OF CONCURRENT GARBAGE COLLECTORSOPENJDK: IN THE NEW AGE OF CONCURRENT GARBAGE COLLECTORS
OPENJDK: IN THE NEW AGE OF CONCURRENT GARBAGE COLLECTORS
Monica Beckwith
 
Java Performance Engineer's Survival Guide
Java Performance Engineer's Survival GuideJava Performance Engineer's Survival Guide
Java Performance Engineer's Survival Guide
Monica Beckwith
 

More from Monica Beckwith (7)

The ilities of software engineering.pptx
The ilities of software engineering.pptxThe ilities of software engineering.pptx
The ilities of software engineering.pptx
 
QCon London.pdf
QCon London.pdfQCon London.pdf
QCon London.pdf
 
Enabling Java: Windows on Arm64 - A Success Story!
Enabling Java: Windows on Arm64 - A Success Story!Enabling Java: Windows on Arm64 - A Success Story!
Enabling Java: Windows on Arm64 - A Success Story!
 
Applying Concurrency Cookbook Recipes to SPEC JBB
Applying Concurrency Cookbook Recipes to SPEC JBBApplying Concurrency Cookbook Recipes to SPEC JBB
Applying Concurrency Cookbook Recipes to SPEC JBB
 
Intro to Garbage Collection
Intro to Garbage CollectionIntro to Garbage Collection
Intro to Garbage Collection
 
OPENJDK: IN THE NEW AGE OF CONCURRENT GARBAGE COLLECTORS
OPENJDK: IN THE NEW AGE OF CONCURRENT GARBAGE COLLECTORSOPENJDK: IN THE NEW AGE OF CONCURRENT GARBAGE COLLECTORS
OPENJDK: IN THE NEW AGE OF CONCURRENT GARBAGE COLLECTORS
 
Java Performance Engineer's Survival Guide
Java Performance Engineer's Survival GuideJava Performance Engineer's Survival Guide
Java Performance Engineer's Survival Guide
 

Recently uploaded

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
Peter Spielvogel
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 

Recently uploaded (20)

Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfSAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 

Garbage First Garbage Collector: Where the Rubber Meets the Road!

  • 1. Garbage First Garbage Collector: Where The Rubber Meets The Road! -By Monica Beckwith Code Karam LLC @mon_beck; monica@codekaram.com 1
  • 2. ©2017 CodeKaram About me • Java performance engineer • President @Code Karam LLC • Partner @Extreme Performance Experts • I have worked with Oracle, Sun, AMD … • I used to work in the capacity of G1 GC performance lead @Oracle. 2
  • 3. ©2017 CodeKaram Agenda • Background on G1 GC • Heap regions - Regular and Humongous • Additional data structures • G1 GC phases 3
  • 4. ©2017 CodeKaram Agenda • Tuning considerations with G1 GC • Taming mixed GCs • Components of a G1 GC pause • Humongous object requirements • Fragmentation • Evacuation failures • Allocation rate and promotion rate 4
  • 7. ©2017 CodeKaram Traditional Java Heap 7 Contiguous Java Heap Eden S0 S1 Old Generation
  • 8. ©2017 CodeKaram Garbage First GC - Heap Regions 8 Contiguous Java Heap Free Region Non-Free Region
  • 9. ©2017 CodeKaram G1 GC Heap Regions • Young Regions - Regions that contain objects in the Eden and Survivor Spaces • Old Regions - Regions that contain objects in the Old generation. • Humongous Regions - Regions that contain Humongous Objects. 9
  • 12. ©2017 CodeKaram Humongous Objects 12 An old generation region A young generation region
  • 13. ©2017 CodeKaram Humongous Objects 13 Object < 50% of G1 region size Object >= 50% of G1 region size Object > G1 region size ??
  • 14. ©2017 CodeKaram14 Object < 50% of G1 region size Humongous Objects
  • 15. ©2017 CodeKaram15 Object >= 50% of G1 region size Humongous Objects
  • 16. ©2017 CodeKaram16 Object > G1 region size Humongous Objects
  • 17. ©2017 CodeKaram17 Object NOT Humongous Object Humongous Object Humongous -> Needs Contiguous Regions Humongous Objects
  • 20. ©2017 CodeKaram Collection Set • A young collection set (CSet) will incorporate all the young regions • A mixed collection set will incorporate all the young regions and a few candidate old regions based on the “most garbage first” principle. 20
  • 21. ©2017 CodeKaram Eden Old Old Eden Old Surv ivor CSet during a young collection - 21 Collection Set
  • 22. ©2017 CodeKaram Old Old Old CSet during a mixed collection - Sur viv or Ol d Eden Eden 22 Collection Set
  • 24. ©2017 CodeKaram Remembered Sets • Additional data structures to help with maintenance • Add a slight footprint overhead (~5%) 24
  • 25. ©2017 CodeKaram • Maintain and track incoming references into its region • old-to-young references • old-to-old references • Remembered sets have varying granularity based on the “popularity” of objects or regions. 25 Remembered Sets
  • 26. ©2017 CodeKaram26 Figure 2.3 Remembered sets with incoming object references** <insert G1-Deep-Dive-Figure-3.tif> empty region young region old region incoming reference into a region incoming reference into an RSet’s owning region RSet for Region y RSet for Region z Region z Region x Region y RSet for Region x <insert G1-Deep-Dive-Figure-3.tif> Figure G1-Deep-Dive-Figure-3: RSet example for one young and two old regions. G1 GC has its way of handling such demands of popularity and it does so by changing the density of RSets. The density of RSets follow three levels of granularity namely; sparse, fine and coarse. For a popular region, the RSet would probably get coarsened to accommodate the pointers from various other regions. This will be reflected in the RSet scanning time for those regions. LEGENDS empty region young region old region incoming reference into a region incoming reference into an RSet’s owning region RSet for Region y RSet for Region z Region z Region x Region y RSet for Region x
  • 28. ©2017 CodeKaram G1 GC - Pause Histogram 28 Pausetimeinmilliseconds 0 30 60 90 120 Timestamps 3415 3416.3 3417.2 3418.4 3419 3422 3423.4 3432.2 3433.2 3436.8 3437.6 3438.9 3440 Young Collection Initial Mark Remark Cleanup Mixed Collection Occupancy == Initiating Heap Occupancy Percent
  • 30. ©2017 CodeKaram The Garbage First Collector Eden Old Old Eden Old Surv ivor E.g.: Current heap configuration - 30
  • 31. ©2017 CodeKaram The Garbage First Collector Eden Old Old Eden Old Surv ivor E.g.: During a young collection - 31
  • 32. ©2017 CodeKaram The Garbage First Collector Old Old Old E.g.: After a young collection - Sur viv or Ol d 32
  • 33. ©2017 CodeKaram Old Old Old Sur viv or Ol d Eden Eden Old The Garbage First Collector 33 E.g.: Current heap configuration -
  • 35. ©2017 CodeKaram Initiating Heap Occupancy Percent 35 • Threshold to start the concurrent marking cycle to identify candidate old regions. • When old generation occupancy crosses this adaptive threshold. • Based on the total heap size.
  • 36. ©2017 CodeKaram Initiating Heap Occupancy Percent - Helpful Options 36 • -XX:InitiatingHeapOccupancyPercent=<p> • -XX:ConcGCThreads=<n>
  • 38. ©2017 CodeKaram Stages of Concurrent Marking 38 • Initial-mark • Root region scan • Concurrent mark • Remark / Final mark • Cleanup
  • 39. ©2017 CodeKaram Class Unloading with Concurrent Mark • With JDK 8 update 40, you have ClassUnloadingWithConcurrentMark, and unreachable classes can be unloaded during Remark. 39
  • 40. ©2017 CodeKaram Old Old Old E.g.: Reclamation of a garbage-filled region during the cleanup phase - Sur viv or Ol d Eden Eden Old The Garbage First Collector 40
  • 41. ©2017 CodeKaram Old Old Old E.g.: Reclamation of a garbage-filled region during the cleanup phase - Sur viv or Ol d Eden Eden The Garbage First Collector 41
  • 43. ©2017 CodeKaram Old Old Old E.g.: Current heap configuration - Sur viv or Ol d Eden Eden The Garbage First Collector 43
  • 44. ©2017 CodeKaram Old Old Old E.g.: During a mixed collection - Sur viv or Ol d Eden Eden The Garbage First Collector 44
  • 45. ©2017 CodeKaram Old E.g.: After a mixed collection - O l d Sur vivo r Old The Garbage First Collector 45
  • 48. ©2017 CodeKaram Say, The young collections are meeting your SLAs, but… The mixed collections are far too frequent and too many OR The mixed collections are blowing your SLAs 48 Why Tame Mixed Collections?
  • 50. ©2017 CodeKaram If meeting the latency SLA is your only concern: Divide the expensive collection further into smaller inexpensive collections 50 What Can We Do?
  • 51. ©2017 CodeKaram Adjusting Each Mixed Collection 51 Minimum number of old regions to be included in the mixed collection set. Maximum number of old regions to be included in the mixed collection set.
  • 52. ©2017 CodeKaram Adjusting Each Mixed Collection 52 -XX:G1MixedGCCountTarget=<n> -XX:G1OldCSetRegionThresholdPercent=<p>
  • 53. ©2017 CodeKaram If the GC overhead is too high and you have heap to spare (after considering your humongous objects requirements): Remove the expensive regions from your collection set 53 What Can We Do?
  • 54. ©2017 CodeKaram Eliminating Expensive Old Regions From Mixed Collections • You could eliminate based on the liveness per old region • You could also eliminate expensive old regions towards the end of the sorted array 54
  • 55. ©2017 CodeKaram Eliminating Expensive Old Regions From Mixed Collections • -XX:G1MixedGCLiveThresholdPercent = <p> • -XX:G1HeapWastePercent = <p> 55
  • 56. Components of a G1 GC Pause 56
  • 58. ©2017 CodeKaram Ideally, you will see that most of your pause time is spent in copying live objects… 58 Major Contributor?
  • 60. ©2017 CodeKaram but, what if that’s not the case? 60 Major Contributor?
  • 61. 61
  • 62. ©2017 CodeKaram , 0.4066560 secs] [Parallel Time: 354.9 ms, GC Workers: 48] [GC Worker Start (ms): Min: 4500060.2, Avg: 4500068.1, Max: 4500085.2, Diff: 24.9] [Ext Root Scanning (ms): Min: 0.0, Avg: 4.8, Max: 31.8, Diff: 31.8, Sum: 231.0] [Update RS (ms): Min: 0.0, Avg: 21.6, Max: 116.3, Diff: 116.3, Sum: 1036.3] [Processed Buffers: Min: 0, Avg: 4.9, Max: 29, Diff: 29, Sum: 234] [Scan RS (ms): Min: 0.0, Avg: 41.5, Max: 62.3, Diff: 62.2, Sum: 1992.1] [Code Root Scanning (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.3] [Object Copy (ms): Min: 195.6, Avg: 233.1, Max: 261.1, Diff: 65.5, Sum: 11189.0] [Termination (ms): Min: 21.0, Avg: 45.6, Max: 74.4, Diff: 53.4, Sum: 2188.5] [GC Worker Other (ms): Min: 0.0, Avg: 0.1, Max: 0.2, Diff: 0.2, Sum: 4.8] [GC Worker Total (ms): Min: 329.6, Avg: 346.7, Max: 354.7, Diff: 25.1, Sum: 16642.0] [GC Worker End (ms): Min: 4500414.7, Avg: 4500414.8, Max: 4500415.0, Diff: 0.2] 62
  • 63. ©2017 CodeKaram [Code Root Fixup: 0.1 ms] [Code Root Migration: 0.2 ms] [Clear CT: 1.4 ms] [Other: 50.1 ms] [Choose CSet: 0.0 ms] [Ref Proc: 34.6 ms] [Ref Enq: 0.3 ms] [Free CSet: 7.5 ms] 63
  • 64. ©2017 CodeKaram [Code Root Fixup: 0.1 ms] [Code Root Migration: 0.2 ms] [Clear CT: 1.4 ms] [Other: 50.1 ms] [Choose CSet: 0.0 ms] [Ref Proc: 34.6 ms] [Ref Enq: 0.3 ms] [Free CSet: 7.5 ms] 64
  • 65. ©2017 CodeKaram , 0.4066560 secs] [Parallel Time: 354.9 ms, GC Workers: 48] [GC Worker Start (ms): Min: 4500060.2, Avg: 4500068.1, Max: 4500085.2, Diff: 24.9] [Ext Root Scanning (ms): Min: 0.0, Avg: 4.8, Max: 31.8, Diff: 31.8, Sum: 231.0] [Update RS (ms): Min: 0.0, Avg: 21.6, Max: 116.3, Diff: 116.3, Sum: 1036.3] [Processed Buffers: Min: 0, Avg: 4.9, Max: 29, Diff: 29, Sum: 234] [Scan RS (ms): Min: 0.0, Avg: 41.5, Max: 62.3, Diff: 62.2, Sum: 1992.1] [Code Root Scanning (ms): Min: 0.0, Avg: 0.0, Max: 0.0, Diff: 0.0, Sum: 0.3] [Object Copy (ms): Min: 195.6, Avg: 233.1, Max: 261.1, Diff: 65.5, Sum: 11189.0] [Termination (ms): Min: 21.0, Avg: 45.6, Max: 74.4, Diff: 53.4, Sum: 2188.5] [GC Worker Other (ms): Min: 0.0, Avg: 0.1, Max: 0.2, Diff: 0.2, Sum: 4.8] [GC Worker Total (ms): Min: 329.6, Avg: 346.7, Max: 354.7, Diff: 25.1, Sum: 16642.0] [GC Worker End (ms): Min: 4500414.7, Avg: 4500414.8, Max: 4500415.0, Diff: 0.2] 65
  • 69. ©2017 CodeKaram Ideally, humongous objects are few in number and are short lived. A lot of long-lived humongous objects can cause evacuation failures since humongous regions add to the old generation occupancy. 69 Humongous Objects
  • 70. ©2017 CodeKaram70 Object NOT Humongous Object Humongous Object Humongous -> Needs Contiguous Regions Humongous Objects
  • 71. ©2017 CodeKaram Humongous Objects: • Are allocated out of the old generation • Are not moved *Note: Since JDK8 update 40, they can be collected during a young collection 71 So, What Did We Observe?
  • 72. ©2017 CodeKaram72 Object NOT Humongous Object Humongous Object Humongous -> Needs Contiguous Regions Wasted Space! Humongous Objects
  • 73. ©2017 CodeKaram Humongous objects can pose the following issues: Wasted space Evacuation failures due to not having enough (to-space) regions 73 So, What Did We Observe?
  • 74. Fragmentation In The G1 Collector 74
  • 75. ©2017 CodeKaram • G1 GC is designed to “absorb” some fragmentation. • Default is 5% of the total Java heap • Tradeoff so that expensive regions are left out. G1 Heap Waste Percentage 75
  • 76. ©2017 CodeKaram G1 Mixed GC (Region) Liveness Threshold 76 • G1 GC’s old regions are also designed to “absorb” some fragmentation. • Default is 85% liveness in a G1 region. • Tradeoff so that expensive regions are left out.
  • 77. ©2017 CodeKaram Humongous Objects 77 • Wasted space! • External fragmentation!
  • 78. ©2017 CodeKaram Humongous Objects 78 • Wasted space! • External fragmentation!
  • 79. ©2017 CodeKaram Fragmentation Can Lead To Evacuation Failures! 79
  • 81. ©2017 CodeKaram Evacuation Failures 81 276.731: [GC pause (G1 Evacuation Pause) (young) (to-space exhausted), 0.8272932 secs] [Parallel Time: 387.0 ms, GC Workers: 8] <snip> [Code Root Fixup: 0.1 ms] [Code Root Purge: 0.0 ms] [Clear CT: 0.2 ms] [Other: 440.0 ms] [Evacuation Failure: 437.5 ms] [Choose CSet: 0.0 ms] [Ref Proc: 0.1 ms] [Ref Enq: 0.0 ms] [Redirty Cards: 0.9 ms] [Humongous Reclaim: 0.0 ms] [Free CSet: 0.9 ms] [Eden: 831.0M(900.0M)->0.0B(900.0M) Survivors: 0.0B->0.0B Heap: 1020.1M(1024.0M)- >1020.1M(1024.0M)] [Times: user=3.64 sys=0.20, real=0.83 secs] **
  • 82. ©2017 CodeKaram • When there are no more regions available for survivors or tenured objects, G1 GC encounters an evacuation failure. • An evacuation failure is expensive and the usual pattern is that if you see a couple of evacuation failures; full GC could* soon follow. 82 Evacuation Failures
  • 83. ©2017 CodeKaram A heavily tuned JVM command line may be restricting the G1 GC ergonomics and adaptability. Start with just your heap sizes and a reasonable pause time goal 83 Avoiding Evacuation Failures
  • 84. ©2017 CodeKaram Your live data set + long live transient data may be too large for the old generation Check LDS+ and increase heap to accommodate everything in the old generation. 84 Avoiding Evacuation Failures
  • 85. ©2017 CodeKaram Initiating Heap Occupancy Threshold could be the issue. Check IHOP and make sure it accommodates the LDS+. IHOP threshold too high -> Delayed marking -> Delayed incremental compaction -> Evacuation Failures! 85 Avoiding Evacuation Failures
  • 86. ©2017 CodeKaram Marking Cycle could be taking too long to complete? Increase concurrent marking threads Reduce IHOP 86 Avoiding Evacuation Failures
  • 87. ©2017 CodeKaram to-space survivors are the problem? Increase the G1ReservePercent, if to-space survivors are triggering the evacuation failures! 87 Avoiding Evacuation Failures
  • 88. 88
  • 89. 89
  • 90. 90
  • 91. ©2017 CodeKaram • 487.817: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: region allocation request failed, allocation request: 524280 bytes] • 487.817: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 524280 bytes, attempted expansion amount: 1048576 bytes] • 487.817: [G1Ergonomics (Heap Sizing) did not expand the heap, reason: heap already fully expanded] • 487.888: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: recent GC overhead higher than threshold after GC, recent GC overhead: 28.40 %, threshold: 10.00 %, uncommitted: 0 bytes, calculated expansion amount: 0 bytes (20.00 %)] 91
  • 92. ©2017 CodeKaram • 487.817: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: region allocation request failed, allocation request: 524280 bytes] • 487.817: [G1Ergonomics (Heap Sizing) expand the heap, requested expansion amount: 524280 bytes, attempted expansion amount: 1048576 bytes] • 487.817: [G1Ergonomics (Heap Sizing) did not expand the heap, reason: heap already fully expanded] • 487.888: [G1Ergonomics (Heap Sizing) attempt heap expansion, reason: recent GC overhead higher than threshold after GC, recent GC overhead: 28.40 %, threshold: 10.00 %, uncommitted: 0 bytes, calculated expansion amount: 0 bytes (20.00 %)] 92
  • 93. 93
  • 95. ©2017 CodeKaram Plot Allocation & Promotion Rates 95
  • 96. ©2017 CodeKaram96 Young Occupancy before GC Young Gen Size Old Gen Occupancy after GC Heap Occupancy before GC Heap Occupancy after GC Heap Size Timestamps