SlideShare a Scribd company logo
1 of 58
Garbage-First Collector:
Current and Future
Adaptability and
Ergonomics.
Monica Beckwith Charlie Hunt John Cuthbertson
What's the talk about?
2
 Sneak a peek under the hood of the latest and
coolest garbage collector, Garbage-First!
 Dive deep into G1's adaptability and ergonomics
 Discuss the future of G1's adaptability
About the Presenters
3
 Charlie Hunt
Architect,
Performance
Engineering,
Salesforce
 Monica
Beckwith
Performance
Architect,
Servergy
 John
Cuthbertson
GC Guru,
Azul Systems
Agenda
 Key Concepts
 Definition
 Ergonomics
 Adaptability (if any)
 Future Adaptability Needs of G1
 Need More Information?
 Questions? - Let‟s Discuss!
4
Key Concepts
 Remembered Sets (RSets)
 Marking Threshold and Concurrent Cycle
 Collection Set (CSet) and Collections
 Mixed Collection
 Young Collection
 Old Regions Collection
 Humongous Allocations
 Evacuation Failures
 Reference Processing
5
Key Concept – Remembered Sets
6
Remembered Sets
 Per-region entries
 Each RSet keeps track of outside references
into its “owning” region
 RSets help regions to be independently GC‟d
 No need to scan the entire heap!
 G1 maintains RSets for –
 old-to-young and
 old-to-old references
7
Remembered Sets (RSets)
8
Region 2
Region 1
Region 3
RSet for
Region 1
RSet for
Region 3
RSet for
Region 2
* Figure referenced from InfoQ article: http://www.infoq.com/articles/tuning-tips-G1-GC
RSets – Ergonomics and Adaptability
 Concurrent Refinement threads –
 Help maintain RSets
 Concurrent updating
 Post-write Barriers –
 After a write
 Help track cross region updates
 Coarsening –
 RSets transitioning through different levels of
granularity
9
RSet - Concurrent Refinement
 Concurrent processing of the filled update
buffers
 Tiered deployment
 Max number can be set by
-XX:G1ConcRefinementThreads
 The processing of update buffers can eventually
fall to the mutator (application) threads
 Need to avoid such a scenario
10
RSet - Coarsenings
 Three levels of granularity –
 Sparse
 Hash table of card indices; Fastest to scan
 Fine
 Card indices held in a bitmap; Scan not as fast as Sparse
table
 Coarse
 One bit for each region; Slowest to scan
11
Key Concept – Marking Threshold
and Concurrent Cycle
12
Marking Threshold and Concurrent
Cycle
 Threshold default: 45% of your Java heap
 -XX:InitiatingHeapOccupancyPercent=<value>
 When threshold‟s crossed, G1 starts a
concurrent cycle
 Some phases are concurrent and some are stop-the
world
 Multi-phased concurrent marking cycle finds the
“best” regions to be collected
 Live-ness accounting
13
Marking Threshold and Concurrent
Cycle
 After the marking phase is complete, G1 has
information on which old regions to collect
 Regions are ordered based on “collection
efficiency”
 Expensive regions would be regions with lots of live
data and large RSets
 Completely free regions are collected during
cleanup phase
 Examples are shown later in this presentation …
14
Marking Threshold – Example 1
15
Default IHOP IHOP increased to 75%
Java heap size Java heap sizeMax heap occupancy
Max heap occupancy
Marking Threshold
Marking Threshold
Marking Threshold – Example 2
16
Default IHOP IHOP increased to
70%
25% Young GCs
60% Mixed GCs
30% Mixed GCs
64% Young GCs
Better to do more young GCs
than mixed GCs
Key Concept – Collection Set and
Collections
17
Collection Set
 A set of regions to be collected during a GC
evacuation pause
 Young Collection will have only and all young
regions in the CSet
 Mixed Collection will have both young and old
regions in the CSet
 Live data in the CSet is evacuated/copied
during a GC cycle
18
Collection Set – Young Collection
Look for the following in PrintAdaptiveSizePolicy enabled log –
6676.431: [GC pause (G1 Evacuation Pause) (young) 6676.431: [G1Ergonomics (CSet
Construction) start choosing CSet, _pending_cards: 147002, predicted base time: 42.39 ms,
remaining time: 157.61 ms, target pause time: 200.00 ms]
6676.431: [G1Ergonomics (CSet Construction) add young
regions to CSet, eden: 950 regions, survivors: 74 regions,
predicted young region time: 160.72 ms]
6676.431: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 950 regions,
survivors: 74 regions, old: 0 regions, predicted pause time: 203.11 ms, target pause time:
200.00 ms]
19
Collection Set – Mixed Collection
5884.952: [GC pause (G1 Evacuation Pause) (mixed) 5884.952: [G1Ergonomics (CSet
Construction) start choosing CSet, _pending_cards: 167183, predicted base time: 48.30 ms,
remaining time: 151.70 ms, target pause time: 200.00 ms]
5884.952: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 952 regions,
survivors: 72 regions, predicted young region time: 225.39 ms]
5884.954: [G1Ergonomics (CSet Construction) finish
adding old regions to CSet, reason: reclaimable percentage
not over threshold, old: 134 regions, max: 308 regions,
reclaimable: 1285706456 bytes (9.98 %), threshold: 10.00 %]
5884.954: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 952 regions,
survivors: 72 regions, old: 134 regions, predicted pause time: 354.55 ms, target pause time:
200.00 ms]
20
Collection Set – Mixed Collection
21
Young Regions
Old Regions
H Humongous Regions
✓ ✓
✓ ✓
✓ H ✓
✓
✓ H
✓
H ✓
* Figure shows both young and old collection sets.
Mixed Collection - Copying
22
✓ ✓
✓ ✓
✓ H ✓
✓
✓ H
✓
H ✓
Live objects are copied
into the “to-space”
regions:
- Survivor Regions
- Old Regions
Mixed Collection – Reclamation
23
✓ ✓
✓ ✓
✓ H ✓
✓
✓ H
✓
H ✓
G1 achieves
compaction via copying
CSet – Ergonomics and Adaptability
 CSet for young entirely depends on –
 The pause time target
 -XX:MaxGCPauseMillis=<value>
 All young regions are included in the CSet
 CSet for mixed collection –
 Could have a minimum number of regions based on
the MixedGCCountTarget and
 But will never cross the max number of regions set by
OldCSetThresholdPercent
24
CSet – Ergonomics and Adaptability
 -XX:G1MixedGCCountTarget (defaults to 8) – sets a target for
mixed collections by setting a minimum limit on the old regions
to collect per mixed collection, the goal is to not exceed the
CountTarget during the mixed collection cycle
 -XX:G1OldCSetRegionThresholdPercent (defaults to 10) – sets
an upper limit on the max number of old regions that can be
collected during a mixed collection (its expressed as a
percentage of the total heap)
25
CSet – Ergonomics and Adaptability
Snippets from a PrintAdaptiveSizePolicy enabled
log –
 <finish adding old regions to CSet, reason: predicted time is too high,
predicted time: 2.27 ms, remaining time: 0.00 ms, old: 12 regions,
min: 12 regions>
 <finish adding old regions to CSet, reason: old CSet region num
reached min, old: 142 regions, min: 142 regions>
 <finish adding old regions to CSet, reason: reclaimable percentage
not over threshold, old: 134 regions, max: 308 regions>
26
Mixed Collection – Ergonomics and
Adaptability
 Young regions – all young regions are
included in a collection
 Old regions are selected based on –
 -XX:G1MixedGCLiveThresholdPercent (defaults to 65) – sets a limit
on the live objects' occupancy such that any old region above that
threshold will not be included in any mixed collection
 Remember GC efficiency?
 -XX:G1HeapWastePercent (defaults to 10) – sets the waste target i.e.
the percentage of heap space you are willing to never collect in an
effort to avoid expensive GCs
 Remember the logs outputs that mentioned “reclaimable percentage not
over threshold”?
27
Young Collection – Ergonomics and
Adaptability
 Young generation size is based on your pause time
target and internally set min and max bounds
 -XX:MaxGCPauseMillis = 200 (default)
 Default min nursery size = 5% of your Java heap
 Default max nursery size = 60% of your Java heap
 Prediction logic
 Determines how much time it will take to collect 1 region
 (Re-)Sizes the young generation accordingly after each
collection
28
Old Regions Collection - Ergonomics
 During Mixed GCs
 Based on the criteria mentioned earlier
809.925: [G1Ergonomics (Mixed GCs) start
mixed GCs, reason: candidate old regions
available, candidate old regions: 4273 regions,
reclaimable: 111102028112 bytes (53.89 %),
threshold: 10.00 %]
29
Old Regions Collection - Ergonomics
 During concurrent cycle
 Entirely free (i.e. full of garbage) regions are collected
6530.615: [GC cleanup 13G->12G(18G), 0.0388540 secs]
 During Full GCs
 Collects and compacts all regions
154.725: [Full GC 1018M->369M(1024M), 1.6437640 secs]
[Eden: 0.0B(51.0M)->0.0B(51.0M) Survivors: 0.0B->0.0B Heap:
1018.3M(1024.0M)->369.4M(1024.0M)]
30
Key Concept – Humongous
Allocations
31
Humongous Objects –What Are
They?
 Objects that span >= 50% of G1‟s region size
 Ideally –
 Not that many in number
 Are long lived
 Allocated directly into the old generation into
Humongous Regions
 Avoids unnecessary copying back and forth and
expensive promotions
 Larger objects will need contiguous regions
32
Humongous Objects – WWG1D?
33
G1 Region –
Young Generation
G1 Region –
Old Generation
Object 1 < 50% of
G1 Region
Object 2 == 50%
of G1 Region
Object 3 > 50%
of G1 Region
Object 4 >
G1 Region
?
Humongous Objects – WWG1D?
34
G1 Region –
Young Generation
G1 Region –
Old Generation
Object 1 < 50% of
G1 Region
Object 2 == 50%
of G1 Region
Object 3 > 50%
of G1 Region
Object 4 >
G1 Region
* Object 4 will need contiguous regions
Object 4 - Humongous
Humongous Objects
35
Object 1 – NOT Humongous
Object 2 - Humongous
Object 3 - Humongous
* Object 4 needs contiguous regions
Wasted
Space
Humongous Objects – What’s The
Catch?
 As of 7u40, initial heap size (-Xms) determines
the region size
 G1 strives for 2048 regions
 Region size a factor of 2 ranging from 1M to 32M
 If there is a vast difference between the initial
and the max heap, normal objects may seem
humongous to G1!
36
Humongous Objects – What’s The
Catch?
 Let‟s look at this PrintAdaptiveSizePolicy enabled
log snippet (Note: G1 region size was 4MB):
 1361.680: [G1Ergonomics (Concurrent Cycles)
request concurrent cycle initiation, reason:
occupancy higher than threshold, occupancy:
1459617792 bytes, allocation request: 4194320
bytes, threshold: 1449551430 bytes (45.00 %),
source: concurrent humongous allocation]
37
Humongous Objects – What’s The
Catch?
 Notes from earlier snippet –
 Concurrent cycle requested
 Reason: Occupancy was higher than threshold
 Allocation size was 4194320 bytes
 Greater than 4MB, hence humongous allocation
 Notes from the log (not shown here) –
 Too many humongous allocations
 Concurrent cycles can‟t keep up with the allocations
 Resulting in to-space exhausted messages and eventually Full GCs
38
Humongous Objects – How to “Fix”
it?
 Let‟s find a region size that can accommodate
the humongous objects as regular allocations
 So the next region size up would be 8MB
 But, 4.000015MB > 50% of 8MB
 So, go to the next size up. i.e. 16MB
 Solution – Set your region size to 16MB
 -XX:G1HeapRegionSize=16M
39
Humongous Allocation –
Ergonomics
 Humongous Regions are not included in a
mixed collection
 Dead Humongous objects are collected during
cleanup and during Full GC
6569.877: [GC cleanup 6708M- >6384M(12G),
0.0181200 secs]
 Live Humongous objects are compacted through
during full GC
40
Key Concept – Evacuation Failures
41
Evacuation Failures
 Evacuation failures indicate that G1 ran out of
heap regions either –
 while copying to survivor regions or
 while promoting or copying live objects in-to the
old generation
 Prior to Java 7u40 evacuation failures shown as
a “to-space overflow” in the GC logs
 Java 7u40 onwards shows “to-space exhausted”
in the GC logs
42
Evacuation Failures – How to Avoid
Them?
 Get a baseline with bare minimum options:
 -Xmx, -Xms and -XX:MaxGCPauseMillis=<value>
 Over-tuning is NOT for G1
 Look at the output of PrintAdaptiveSizePolicy
 Too many humongous allocations?
 Increase G1HeapRegionSize
43
Evacuation Failures
 Plot the heap utilization stats from the log
 Marking threshold too high?
 Can‟t keep up with promotions
 Marking threshold too low?
 Not reclaiming much space from marking cycle
 Concurrent cycles taking a long time to
complete?
 Increase the thread count: ConcGCThreads
44
Evacuation Failures
 Sometimes survivor space gets exhausted
 Increase the G1ReservePercent
 It‟s a false ceiling
 Defaults to 10
 G1 will cap it off at 50%
45
Key Concept – Reference Processing
46
Reference Processing
47
0
10
20
30
40
50
60
70
80
90
100
[GCpause
remark
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
remark
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
remark
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
remark
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
remark
[GCpause
User Time (in secs) System Time (in secs)
Real Time (in secs) Scaling
Reference Processing
48
9185.651: [GC remark 9185.653: [GC ref-proc, 5.2216490 secs], 5.2946850 secs]
[Times: user=5.62 sys=0.00, real=5.29 secs]
[Other: 339.7 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 287.8 ms]
[Ref Enq: 5.4 ms]
[Free CSet: 6.9 ms]
This is not good!
Parallel Reference Processing
49
0
10
20
30
40
50
60
70
80
90
100
[GCpause
remark
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
remark
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
remark
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
remark
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
[GCpause
remark
[GCpause
User Time (in secs) System Time (in secs)
Real Time (in secs) Scaling
After enabling -XX:+ParallelRefProcEnabled
Parallel Reference Processing
50
9095.305: [GC remark 9095.309: [GC ref-proc, 0.4888450
secs], 0.5621620 secs]
[Times: user=7.84 sys=0.03, real=0.56 secs]
[Other: 91.0 ms]
[Choose CSet: 0.0 ms]
[Ref Proc: 43.9 ms]
[Ref Enq: 1.0 ms]
[Free CSet: 7.4 ms]
Ooh yeah,
much better!
Future Adaptability
51
Future Adaptability
 Adaptive marking threshold?
 A static value doesn‟t cut it
 CMS has adaptive marking threshold with static
override and static max value
 Wouldn‟t it be nice if G1 had an adaptive threshold
and adaptive max value?
 Adaptive region size?
 Will help alleviate the issues that applications with
numerous short-lived “humongous” objects encounter
52
Future Adaptability
 Avoiding evacuation failures
 http://bugs.sun.com/bugdatabase/view_bug.do?bug
_id=8014019
 Reducing the cost of evacuation failures
 http://bugs.sun.com/bugdatabase/view_bug.do?bug
_id=8003237
 http://bugs.sun.com/bugdatabase/view_bug.do?bug
_id=8003235
53
Future Adaptability
 Improving RSets
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7187490
 Improving concurrent refinement thresholds to
reduce the possibility of long RSet updating times.
 Smarter/ adaptable criteria for selecting CSet
for old regions
 Smarter/ adaptable Mixed Collections
 http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7173711
54
Want More Info?
55
G1 Articles on the Web
 http://www.infoq.com/articles/G1-One-Garbage-Collector-To-
Rule-Them-All
 http://www.infoq.com/articles/tuning-tips-G1-GC
 http://www.oracle.com/technetwork/articles/java/g1gc-
1984535.html
 http://www.infoq.com/presentations/java-g1
 https://oracleus.activeevents.com/connect/sessionDetail.ww?SE
SSION_ID=6583
 https://blogs.oracle.com/javatraining/entry/getting_started_with
_the_g1
56
Questions?
Let‟s discuss „em!
57
More Questions?
HOL5429: Tuning Low-Pause Garbage Collection – Tue 10 am
CON3754: G1 GC: Migration to, Expectations, and Advanced Tuning –
Wed 10 am
CON7624: Understanding Java Garbage Collection and What You Can
Do About It. – Wed 11:30 am
GC Tuning BOF4020 - Tonight @7:30 pm
JVM Performance BOF4471 – Tonight @8:30 pm
Email: hotspot-gc-use@openjdk.java.net & hotspot-gc-
dev@openjdk.java.net
58

More Related Content

What's hot

Let's Learn to Talk to GC Logs in Java 9
Let's Learn to Talk to GC Logs in Java 9Let's Learn to Talk to GC Logs in Java 9
Let's Learn to Talk to GC Logs in Java 9Poonam Bajaj Parhar
 
Top 5 Mistakes to Avoid When Writing Apache Spark Applications
Top 5 Mistakes to Avoid When Writing Apache Spark ApplicationsTop 5 Mistakes to Avoid When Writing Apache Spark Applications
Top 5 Mistakes to Avoid When Writing Apache Spark ApplicationsCloudera, Inc.
 
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation BuffersHBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation BuffersCloudera, Inc.
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsJonas Bonér
 
Introduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparoundIntroduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparoundMasahiko Sawada
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudNoritaka Sekiyama
 
Oracle Client Failover - Under The Hood
Oracle Client Failover - Under The HoodOracle Client Failover - Under The Hood
Oracle Client Failover - Under The HoodLudovico Caldara
 
re:Invent 2019 BPF Performance Analysis at Netflix
re:Invent 2019 BPF Performance Analysis at Netflixre:Invent 2019 BPF Performance Analysis at Netflix
re:Invent 2019 BPF Performance Analysis at NetflixBrendan Gregg
 
PostgreSQL and CockroachDB SQL
PostgreSQL and CockroachDB SQLPostgreSQL and CockroachDB SQL
PostgreSQL and CockroachDB SQLCockroachDB
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance AnalysisBrendan Gregg
 
Let's turn your PostgreSQL into columnar store with cstore_fdw
Let's turn your PostgreSQL into columnar store with cstore_fdwLet's turn your PostgreSQL into columnar store with cstore_fdw
Let's turn your PostgreSQL into columnar store with cstore_fdwJan Holčapek
 
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.
 
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 @TwitterAttila Szegedi
 
G1 collector and tuning and Cassandra
G1 collector and tuning and CassandraG1 collector and tuning and Cassandra
G1 collector and tuning and CassandraChris Lohfink
 
Optimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL JoinsOptimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL JoinsDatabricks
 
Apache Cassandra - Diagnostics and monitoring
Apache Cassandra - Diagnostics and monitoringApache Cassandra - Diagnostics and monitoring
Apache Cassandra - Diagnostics and monitoringAlex Thompson
 
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroThe Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroDatabricks
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVMRafael Winterhalter
 

What's hot (20)

Let's Learn to Talk to GC Logs in Java 9
Let's Learn to Talk to GC Logs in Java 9Let's Learn to Talk to GC Logs in Java 9
Let's Learn to Talk to GC Logs in Java 9
 
Top 5 Mistakes to Avoid When Writing Apache Spark Applications
Top 5 Mistakes to Avoid When Writing Apache Spark ApplicationsTop 5 Mistakes to Avoid When Writing Apache Spark Applications
Top 5 Mistakes to Avoid When Writing Apache Spark Applications
 
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation BuffersHBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
HBase HUG Presentation: Avoiding Full GCs with MemStore-Local Allocation Buffers
 
Scalability, Availability & Stability Patterns
Scalability, Availability & Stability PatternsScalability, Availability & Stability Patterns
Scalability, Availability & Stability Patterns
 
Introduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparoundIntroduction VAUUM, Freezing, XID wraparound
Introduction VAUUM, Freezing, XID wraparound
 
Native Memory Tracking
Native Memory TrackingNative Memory Tracking
Native Memory Tracking
 
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the CloudAmazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
Amazon S3 Best Practice and Tuning for Hadoop/Spark in the Cloud
 
Oracle Client Failover - Under The Hood
Oracle Client Failover - Under The HoodOracle Client Failover - Under The Hood
Oracle Client Failover - Under The Hood
 
re:Invent 2019 BPF Performance Analysis at Netflix
re:Invent 2019 BPF Performance Analysis at Netflixre:Invent 2019 BPF Performance Analysis at Netflix
re:Invent 2019 BPF Performance Analysis at Netflix
 
Elk stack
Elk stackElk stack
Elk stack
 
PostgreSQL and CockroachDB SQL
PostgreSQL and CockroachDB SQLPostgreSQL and CockroachDB SQL
PostgreSQL and CockroachDB SQL
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance Analysis
 
Let's turn your PostgreSQL into columnar store with cstore_fdw
Let's turn your PostgreSQL into columnar store with cstore_fdwLet's turn your PostgreSQL into columnar store with cstore_fdw
Let's turn your PostgreSQL into columnar store with cstore_fdw
 
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
 
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
 
G1 collector and tuning and Cassandra
G1 collector and tuning and CassandraG1 collector and tuning and Cassandra
G1 collector and tuning and Cassandra
 
Optimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL JoinsOptimizing Apache Spark SQL Joins
Optimizing Apache Spark SQL Joins
 
Apache Cassandra - Diagnostics and monitoring
Apache Cassandra - Diagnostics and monitoringApache Cassandra - Diagnostics and monitoring
Apache Cassandra - Diagnostics and monitoring
 
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/AvroThe Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
The Rise of ZStandard: Apache Spark/Parquet/ORC/Avro
 
A topology of memory leaks on the JVM
A topology of memory leaks on the JVMA topology of memory leaks on the JVM
A topology of memory leaks on the JVM
 

Viewers also liked

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
 
JFokus Java 9 contended locking performance
JFokus Java 9 contended locking performanceJFokus Java 9 contended locking performance
JFokus Java 9 contended locking performanceMonica 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 GCMonica Beckwith
 
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 CompilationMonica 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 Performance Engineer's Survival Guide
Java Performance Engineer's Survival GuideJava Performance Engineer's Survival Guide
Java Performance Engineer's Survival GuideMonica Beckwith
 
OFFICE ERGONOMICS: WHAT, HOW & WHY. An Essential Reading For Office Workers.
OFFICE ERGONOMICS: WHAT, HOW & WHY. An Essential Reading For Office Workers.OFFICE ERGONOMICS: WHAT, HOW & WHY. An Essential Reading For Office Workers.
OFFICE ERGONOMICS: WHAT, HOW & WHY. An Essential Reading For Office Workers.Abdul Shukor
 
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 EngineerMonica Beckwith
 
楽して JVM を学びたい #jjug
楽して JVM を学びたい #jjug楽して JVM を学びたい #jjug
楽して JVM を学びたい #jjugYuji Kubota
 
JVM のいろはにほ #javajo
JVM のいろはにほ #javajoJVM のいろはにほ #javajo
JVM のいろはにほ #javajoYuji Kubota
 
java.lang.OutOfMemoryError #渋谷java
java.lang.OutOfMemoryError #渋谷javajava.lang.OutOfMemoryError #渋谷java
java.lang.OutOfMemoryError #渋谷javaYuji Kubota
 
Concurrent Mark-Sweep Garbage Collection #jjug_ccc
Concurrent Mark-Sweep Garbage Collection #jjug_cccConcurrent Mark-Sweep Garbage Collection #jjug_ccc
Concurrent Mark-Sweep Garbage Collection #jjug_cccYuji Kubota
 
Ergonomics Presentation
Ergonomics PresentationErgonomics Presentation
Ergonomics Presentationkitten23
 
Ergonomics Presentation Final
Ergonomics Presentation FinalErgonomics Presentation Final
Ergonomics Presentation Finalkrisazavache
 

Viewers also liked (15)

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 :)
 
JFokus Java 9 contended locking performance
JFokus Java 9 contended locking performanceJFokus Java 9 contended locking performance
JFokus Java 9 contended locking performance
 
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 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
 
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 Performance Engineer's Survival Guide
Java Performance Engineer's Survival GuideJava Performance Engineer's Survival Guide
Java Performance Engineer's Survival Guide
 
OFFICE ERGONOMICS: WHAT, HOW & WHY. An Essential Reading For Office Workers.
OFFICE ERGONOMICS: WHAT, HOW & WHY. An Essential Reading For Office Workers.OFFICE ERGONOMICS: WHAT, HOW & WHY. An Essential Reading For Office Workers.
OFFICE ERGONOMICS: WHAT, HOW & WHY. An Essential Reading For Office Workers.
 
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
 
楽して JVM を学びたい #jjug
楽して JVM を学びたい #jjug楽して JVM を学びたい #jjug
楽して JVM を学びたい #jjug
 
JVM のいろはにほ #javajo
JVM のいろはにほ #javajoJVM のいろはにほ #javajo
JVM のいろはにほ #javajo
 
What Is Ergonomics
What Is  ErgonomicsWhat Is  Ergonomics
What Is Ergonomics
 
java.lang.OutOfMemoryError #渋谷java
java.lang.OutOfMemoryError #渋谷javajava.lang.OutOfMemoryError #渋谷java
java.lang.OutOfMemoryError #渋谷java
 
Concurrent Mark-Sweep Garbage Collection #jjug_ccc
Concurrent Mark-Sweep Garbage Collection #jjug_cccConcurrent Mark-Sweep Garbage Collection #jjug_ccc
Concurrent Mark-Sweep Garbage Collection #jjug_ccc
 
Ergonomics Presentation
Ergonomics PresentationErgonomics Presentation
Ergonomics Presentation
 
Ergonomics Presentation Final
Ergonomics Presentation FinalErgonomics Presentation Final
Ergonomics Presentation Final
 

Similar to Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and Ergonomics.

JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & DiagnosticsDhaval Shah
 
G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?C2B2 Consulting
 
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14Jayesh Thakrar
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gcexsuns
 
What you need to know about GC
What you need to know about GCWhat you need to know about GC
What you need to know about GCKelum Senanayake
 
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) CollectorJava Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) CollectorGurpreet Sachdeva
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvmPrem Kuppumani
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Tier1 App
 
7-JVM-arguments-JaxLondon-2023.pptx
7-JVM-arguments-JaxLondon-2023.pptx7-JVM-arguments-JaxLondon-2023.pptx
7-JVM-arguments-JaxLondon-2023.pptxTier1 app
 
Accelerate Reed-Solomon coding for Fault-Tolerance in RAID-like system
Accelerate Reed-Solomon coding for Fault-Tolerance in RAID-like systemAccelerate Reed-Solomon coding for Fault-Tolerance in RAID-like system
Accelerate Reed-Solomon coding for Fault-Tolerance in RAID-like systemShuai Yuan
 
Demystifying Garbage Collection in Java
Demystifying Garbage Collection in JavaDemystifying Garbage Collection in Java
Demystifying Garbage Collection in JavaIgor Braga
 
JVM Garbage Collection Tuning
JVM Garbage Collection TuningJVM Garbage Collection Tuning
JVM Garbage Collection Tuningihji
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Anna Shymchenko
 
An introduction to G1 collector for busy developers
An introduction to G1 collector for busy developersAn introduction to G1 collector for busy developers
An introduction to G1 collector for busy developersSanjoy Kumar Roy
 
Garbage collection in JVM
Garbage collection in JVMGarbage collection in JVM
Garbage collection in JVMaragozin
 
Garbage Collection of Java VM
Garbage Collection of Java VMGarbage Collection of Java VM
Garbage Collection of Java VMYongqiang Li
 

Similar to Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and Ergonomics. (20)

G1GC
G1GCG1GC
G1GC
 
A G1GC Saga-KCJUG.pptx
A G1GC Saga-KCJUG.pptxA G1GC Saga-KCJUG.pptx
A G1GC Saga-KCJUG.pptx
 
JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & Diagnostics
 
G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?G1 Garbage Collector - Big Heaps and Low Pauses?
G1 Garbage Collector - Big Heaps and Low Pauses?
 
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
Chicago-Java-User-Group-Meetup-Some-Garbage-Talk-2015-01-14
 
java memory management & gc
java memory management & gcjava memory management & gc
java memory management & gc
 
JVM Magic
JVM MagicJVM Magic
JVM Magic
 
What you need to know about GC
What you need to know about GCWhat you need to know about GC
What you need to know about GC
 
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) CollectorJava Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
Java Garbage Collectors – Moving to Java7 Garbage First (G1) Collector
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvm
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?
 
7-JVM-arguments-JaxLondon-2023.pptx
7-JVM-arguments-JaxLondon-2023.pptx7-JVM-arguments-JaxLondon-2023.pptx
7-JVM-arguments-JaxLondon-2023.pptx
 
Accelerate Reed-Solomon coding for Fault-Tolerance in RAID-like system
Accelerate Reed-Solomon coding for Fault-Tolerance in RAID-like systemAccelerate Reed-Solomon coding for Fault-Tolerance in RAID-like system
Accelerate Reed-Solomon coding for Fault-Tolerance in RAID-like system
 
Demystifying Garbage Collection in Java
Demystifying Garbage Collection in JavaDemystifying Garbage Collection in Java
Demystifying Garbage Collection in Java
 
JVM Garbage Collection Tuning
JVM Garbage Collection TuningJVM Garbage Collection Tuning
JVM Garbage Collection Tuning
 
ZGC-SnowOne.pdf
ZGC-SnowOne.pdfZGC-SnowOne.pdf
ZGC-SnowOne.pdf
 
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
Вячеслав Блинов «Java Garbage Collection: A Performance Impact»
 
An introduction to G1 collector for busy developers
An introduction to G1 collector for busy developersAn introduction to G1 collector for busy developers
An introduction to G1 collector for busy developers
 
Garbage collection in JVM
Garbage collection in JVMGarbage collection in JVM
Garbage collection in JVM
 
Garbage Collection of Java VM
Garbage Collection of Java VMGarbage Collection of Java VM
Garbage Collection of Java VM
 

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.pptxMonica 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 JBBMonica Beckwith
 
Intro to Garbage Collection
Intro to Garbage CollectionIntro to Garbage Collection
Intro to Garbage CollectionMonica Beckwith
 
OpenJDK Concurrent Collectors
OpenJDK Concurrent CollectorsOpenJDK Concurrent Collectors
OpenJDK Concurrent CollectorsMonica 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 COLLECTORSMonica Beckwith
 
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 MachineMonica Beckwith
 
Way Improved :) GC Tuning Confessions - presented at JavaOne2015
Way Improved :) GC Tuning Confessions - presented at JavaOne2015Way Improved :) GC Tuning Confessions - presented at JavaOne2015
Way Improved :) GC Tuning Confessions - presented at JavaOne2015Monica Beckwith
 

More from Monica Beckwith (9)

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 Concurrent Collectors
OpenJDK Concurrent CollectorsOpenJDK Concurrent Collectors
OpenJDK Concurrent Collectors
 
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
 
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
 
Way Improved :) GC Tuning Confessions - presented at JavaOne2015
Way Improved :) GC Tuning Confessions - presented at JavaOne2015Way Improved :) GC Tuning Confessions - presented at JavaOne2015
Way Improved :) GC Tuning Confessions - presented at JavaOne2015
 

Recently uploaded

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 

Garbage First Garbage Collector (G1 GC): Current and Future Adaptability and Ergonomics.

  • 1. Garbage-First Collector: Current and Future Adaptability and Ergonomics. Monica Beckwith Charlie Hunt John Cuthbertson
  • 2. What's the talk about? 2  Sneak a peek under the hood of the latest and coolest garbage collector, Garbage-First!  Dive deep into G1's adaptability and ergonomics  Discuss the future of G1's adaptability
  • 3. About the Presenters 3  Charlie Hunt Architect, Performance Engineering, Salesforce  Monica Beckwith Performance Architect, Servergy  John Cuthbertson GC Guru, Azul Systems
  • 4. Agenda  Key Concepts  Definition  Ergonomics  Adaptability (if any)  Future Adaptability Needs of G1  Need More Information?  Questions? - Let‟s Discuss! 4
  • 5. Key Concepts  Remembered Sets (RSets)  Marking Threshold and Concurrent Cycle  Collection Set (CSet) and Collections  Mixed Collection  Young Collection  Old Regions Collection  Humongous Allocations  Evacuation Failures  Reference Processing 5
  • 6. Key Concept – Remembered Sets 6
  • 7. Remembered Sets  Per-region entries  Each RSet keeps track of outside references into its “owning” region  RSets help regions to be independently GC‟d  No need to scan the entire heap!  G1 maintains RSets for –  old-to-young and  old-to-old references 7
  • 8. Remembered Sets (RSets) 8 Region 2 Region 1 Region 3 RSet for Region 1 RSet for Region 3 RSet for Region 2 * Figure referenced from InfoQ article: http://www.infoq.com/articles/tuning-tips-G1-GC
  • 9. RSets – Ergonomics and Adaptability  Concurrent Refinement threads –  Help maintain RSets  Concurrent updating  Post-write Barriers –  After a write  Help track cross region updates  Coarsening –  RSets transitioning through different levels of granularity 9
  • 10. RSet - Concurrent Refinement  Concurrent processing of the filled update buffers  Tiered deployment  Max number can be set by -XX:G1ConcRefinementThreads  The processing of update buffers can eventually fall to the mutator (application) threads  Need to avoid such a scenario 10
  • 11. RSet - Coarsenings  Three levels of granularity –  Sparse  Hash table of card indices; Fastest to scan  Fine  Card indices held in a bitmap; Scan not as fast as Sparse table  Coarse  One bit for each region; Slowest to scan 11
  • 12. Key Concept – Marking Threshold and Concurrent Cycle 12
  • 13. Marking Threshold and Concurrent Cycle  Threshold default: 45% of your Java heap  -XX:InitiatingHeapOccupancyPercent=<value>  When threshold‟s crossed, G1 starts a concurrent cycle  Some phases are concurrent and some are stop-the world  Multi-phased concurrent marking cycle finds the “best” regions to be collected  Live-ness accounting 13
  • 14. Marking Threshold and Concurrent Cycle  After the marking phase is complete, G1 has information on which old regions to collect  Regions are ordered based on “collection efficiency”  Expensive regions would be regions with lots of live data and large RSets  Completely free regions are collected during cleanup phase  Examples are shown later in this presentation … 14
  • 15. Marking Threshold – Example 1 15 Default IHOP IHOP increased to 75% Java heap size Java heap sizeMax heap occupancy Max heap occupancy Marking Threshold Marking Threshold
  • 16. Marking Threshold – Example 2 16 Default IHOP IHOP increased to 70% 25% Young GCs 60% Mixed GCs 30% Mixed GCs 64% Young GCs Better to do more young GCs than mixed GCs
  • 17. Key Concept – Collection Set and Collections 17
  • 18. Collection Set  A set of regions to be collected during a GC evacuation pause  Young Collection will have only and all young regions in the CSet  Mixed Collection will have both young and old regions in the CSet  Live data in the CSet is evacuated/copied during a GC cycle 18
  • 19. Collection Set – Young Collection Look for the following in PrintAdaptiveSizePolicy enabled log – 6676.431: [GC pause (G1 Evacuation Pause) (young) 6676.431: [G1Ergonomics (CSet Construction) start choosing CSet, _pending_cards: 147002, predicted base time: 42.39 ms, remaining time: 157.61 ms, target pause time: 200.00 ms] 6676.431: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 950 regions, survivors: 74 regions, predicted young region time: 160.72 ms] 6676.431: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 950 regions, survivors: 74 regions, old: 0 regions, predicted pause time: 203.11 ms, target pause time: 200.00 ms] 19
  • 20. Collection Set – Mixed Collection 5884.952: [GC pause (G1 Evacuation Pause) (mixed) 5884.952: [G1Ergonomics (CSet Construction) start choosing CSet, _pending_cards: 167183, predicted base time: 48.30 ms, remaining time: 151.70 ms, target pause time: 200.00 ms] 5884.952: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 952 regions, survivors: 72 regions, predicted young region time: 225.39 ms] 5884.954: [G1Ergonomics (CSet Construction) finish adding old regions to CSet, reason: reclaimable percentage not over threshold, old: 134 regions, max: 308 regions, reclaimable: 1285706456 bytes (9.98 %), threshold: 10.00 %] 5884.954: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 952 regions, survivors: 72 regions, old: 134 regions, predicted pause time: 354.55 ms, target pause time: 200.00 ms] 20
  • 21. Collection Set – Mixed Collection 21 Young Regions Old Regions H Humongous Regions ✓ ✓ ✓ ✓ ✓ H ✓ ✓ ✓ H ✓ H ✓ * Figure shows both young and old collection sets.
  • 22. Mixed Collection - Copying 22 ✓ ✓ ✓ ✓ ✓ H ✓ ✓ ✓ H ✓ H ✓ Live objects are copied into the “to-space” regions: - Survivor Regions - Old Regions
  • 23. Mixed Collection – Reclamation 23 ✓ ✓ ✓ ✓ ✓ H ✓ ✓ ✓ H ✓ H ✓ G1 achieves compaction via copying
  • 24. CSet – Ergonomics and Adaptability  CSet for young entirely depends on –  The pause time target  -XX:MaxGCPauseMillis=<value>  All young regions are included in the CSet  CSet for mixed collection –  Could have a minimum number of regions based on the MixedGCCountTarget and  But will never cross the max number of regions set by OldCSetThresholdPercent 24
  • 25. CSet – Ergonomics and Adaptability  -XX:G1MixedGCCountTarget (defaults to 8) – sets a target for mixed collections by setting a minimum limit on the old regions to collect per mixed collection, the goal is to not exceed the CountTarget during the mixed collection cycle  -XX:G1OldCSetRegionThresholdPercent (defaults to 10) – sets an upper limit on the max number of old regions that can be collected during a mixed collection (its expressed as a percentage of the total heap) 25
  • 26. CSet – Ergonomics and Adaptability Snippets from a PrintAdaptiveSizePolicy enabled log –  <finish adding old regions to CSet, reason: predicted time is too high, predicted time: 2.27 ms, remaining time: 0.00 ms, old: 12 regions, min: 12 regions>  <finish adding old regions to CSet, reason: old CSet region num reached min, old: 142 regions, min: 142 regions>  <finish adding old regions to CSet, reason: reclaimable percentage not over threshold, old: 134 regions, max: 308 regions> 26
  • 27. Mixed Collection – Ergonomics and Adaptability  Young regions – all young regions are included in a collection  Old regions are selected based on –  -XX:G1MixedGCLiveThresholdPercent (defaults to 65) – sets a limit on the live objects' occupancy such that any old region above that threshold will not be included in any mixed collection  Remember GC efficiency?  -XX:G1HeapWastePercent (defaults to 10) – sets the waste target i.e. the percentage of heap space you are willing to never collect in an effort to avoid expensive GCs  Remember the logs outputs that mentioned “reclaimable percentage not over threshold”? 27
  • 28. Young Collection – Ergonomics and Adaptability  Young generation size is based on your pause time target and internally set min and max bounds  -XX:MaxGCPauseMillis = 200 (default)  Default min nursery size = 5% of your Java heap  Default max nursery size = 60% of your Java heap  Prediction logic  Determines how much time it will take to collect 1 region  (Re-)Sizes the young generation accordingly after each collection 28
  • 29. Old Regions Collection - Ergonomics  During Mixed GCs  Based on the criteria mentioned earlier 809.925: [G1Ergonomics (Mixed GCs) start mixed GCs, reason: candidate old regions available, candidate old regions: 4273 regions, reclaimable: 111102028112 bytes (53.89 %), threshold: 10.00 %] 29
  • 30. Old Regions Collection - Ergonomics  During concurrent cycle  Entirely free (i.e. full of garbage) regions are collected 6530.615: [GC cleanup 13G->12G(18G), 0.0388540 secs]  During Full GCs  Collects and compacts all regions 154.725: [Full GC 1018M->369M(1024M), 1.6437640 secs] [Eden: 0.0B(51.0M)->0.0B(51.0M) Survivors: 0.0B->0.0B Heap: 1018.3M(1024.0M)->369.4M(1024.0M)] 30
  • 31. Key Concept – Humongous Allocations 31
  • 32. Humongous Objects –What Are They?  Objects that span >= 50% of G1‟s region size  Ideally –  Not that many in number  Are long lived  Allocated directly into the old generation into Humongous Regions  Avoids unnecessary copying back and forth and expensive promotions  Larger objects will need contiguous regions 32
  • 33. Humongous Objects – WWG1D? 33 G1 Region – Young Generation G1 Region – Old Generation Object 1 < 50% of G1 Region Object 2 == 50% of G1 Region Object 3 > 50% of G1 Region Object 4 > G1 Region ?
  • 34. Humongous Objects – WWG1D? 34 G1 Region – Young Generation G1 Region – Old Generation Object 1 < 50% of G1 Region Object 2 == 50% of G1 Region Object 3 > 50% of G1 Region Object 4 > G1 Region * Object 4 will need contiguous regions
  • 35. Object 4 - Humongous Humongous Objects 35 Object 1 – NOT Humongous Object 2 - Humongous Object 3 - Humongous * Object 4 needs contiguous regions Wasted Space
  • 36. Humongous Objects – What’s The Catch?  As of 7u40, initial heap size (-Xms) determines the region size  G1 strives for 2048 regions  Region size a factor of 2 ranging from 1M to 32M  If there is a vast difference between the initial and the max heap, normal objects may seem humongous to G1! 36
  • 37. Humongous Objects – What’s The Catch?  Let‟s look at this PrintAdaptiveSizePolicy enabled log snippet (Note: G1 region size was 4MB):  1361.680: [G1Ergonomics (Concurrent Cycles) request concurrent cycle initiation, reason: occupancy higher than threshold, occupancy: 1459617792 bytes, allocation request: 4194320 bytes, threshold: 1449551430 bytes (45.00 %), source: concurrent humongous allocation] 37
  • 38. Humongous Objects – What’s The Catch?  Notes from earlier snippet –  Concurrent cycle requested  Reason: Occupancy was higher than threshold  Allocation size was 4194320 bytes  Greater than 4MB, hence humongous allocation  Notes from the log (not shown here) –  Too many humongous allocations  Concurrent cycles can‟t keep up with the allocations  Resulting in to-space exhausted messages and eventually Full GCs 38
  • 39. Humongous Objects – How to “Fix” it?  Let‟s find a region size that can accommodate the humongous objects as regular allocations  So the next region size up would be 8MB  But, 4.000015MB > 50% of 8MB  So, go to the next size up. i.e. 16MB  Solution – Set your region size to 16MB  -XX:G1HeapRegionSize=16M 39
  • 40. Humongous Allocation – Ergonomics  Humongous Regions are not included in a mixed collection  Dead Humongous objects are collected during cleanup and during Full GC 6569.877: [GC cleanup 6708M- >6384M(12G), 0.0181200 secs]  Live Humongous objects are compacted through during full GC 40
  • 41. Key Concept – Evacuation Failures 41
  • 42. Evacuation Failures  Evacuation failures indicate that G1 ran out of heap regions either –  while copying to survivor regions or  while promoting or copying live objects in-to the old generation  Prior to Java 7u40 evacuation failures shown as a “to-space overflow” in the GC logs  Java 7u40 onwards shows “to-space exhausted” in the GC logs 42
  • 43. Evacuation Failures – How to Avoid Them?  Get a baseline with bare minimum options:  -Xmx, -Xms and -XX:MaxGCPauseMillis=<value>  Over-tuning is NOT for G1  Look at the output of PrintAdaptiveSizePolicy  Too many humongous allocations?  Increase G1HeapRegionSize 43
  • 44. Evacuation Failures  Plot the heap utilization stats from the log  Marking threshold too high?  Can‟t keep up with promotions  Marking threshold too low?  Not reclaiming much space from marking cycle  Concurrent cycles taking a long time to complete?  Increase the thread count: ConcGCThreads 44
  • 45. Evacuation Failures  Sometimes survivor space gets exhausted  Increase the G1ReservePercent  It‟s a false ceiling  Defaults to 10  G1 will cap it off at 50% 45
  • 46. Key Concept – Reference Processing 46
  • 48. Reference Processing 48 9185.651: [GC remark 9185.653: [GC ref-proc, 5.2216490 secs], 5.2946850 secs] [Times: user=5.62 sys=0.00, real=5.29 secs] [Other: 339.7 ms] [Choose CSet: 0.0 ms] [Ref Proc: 287.8 ms] [Ref Enq: 5.4 ms] [Free CSet: 6.9 ms] This is not good!
  • 50. Parallel Reference Processing 50 9095.305: [GC remark 9095.309: [GC ref-proc, 0.4888450 secs], 0.5621620 secs] [Times: user=7.84 sys=0.03, real=0.56 secs] [Other: 91.0 ms] [Choose CSet: 0.0 ms] [Ref Proc: 43.9 ms] [Ref Enq: 1.0 ms] [Free CSet: 7.4 ms] Ooh yeah, much better!
  • 52. Future Adaptability  Adaptive marking threshold?  A static value doesn‟t cut it  CMS has adaptive marking threshold with static override and static max value  Wouldn‟t it be nice if G1 had an adaptive threshold and adaptive max value?  Adaptive region size?  Will help alleviate the issues that applications with numerous short-lived “humongous” objects encounter 52
  • 53. Future Adaptability  Avoiding evacuation failures  http://bugs.sun.com/bugdatabase/view_bug.do?bug _id=8014019  Reducing the cost of evacuation failures  http://bugs.sun.com/bugdatabase/view_bug.do?bug _id=8003237  http://bugs.sun.com/bugdatabase/view_bug.do?bug _id=8003235 53
  • 54. Future Adaptability  Improving RSets  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7187490  Improving concurrent refinement thresholds to reduce the possibility of long RSet updating times.  Smarter/ adaptable criteria for selecting CSet for old regions  Smarter/ adaptable Mixed Collections  http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7173711 54
  • 56. G1 Articles on the Web  http://www.infoq.com/articles/G1-One-Garbage-Collector-To- Rule-Them-All  http://www.infoq.com/articles/tuning-tips-G1-GC  http://www.oracle.com/technetwork/articles/java/g1gc- 1984535.html  http://www.infoq.com/presentations/java-g1  https://oracleus.activeevents.com/connect/sessionDetail.ww?SE SSION_ID=6583  https://blogs.oracle.com/javatraining/entry/getting_started_with _the_g1 56
  • 58. More Questions? HOL5429: Tuning Low-Pause Garbage Collection – Tue 10 am CON3754: G1 GC: Migration to, Expectations, and Advanced Tuning – Wed 10 am CON7624: Understanding Java Garbage Collection and What You Can Do About It. – Wed 11:30 am GC Tuning BOF4020 - Tonight @7:30 pm JVM Performance BOF4471 – Tonight @8:30 pm Email: hotspot-gc-use@openjdk.java.net & hotspot-gc- dev@openjdk.java.net 58

Editor's Notes

  1. These are the same graphs we used for Qcon… we can replace the data with Charlie’s data.