SlideShare a Scribd company logo
Copyright 2016 Kirk Pepperdine
Moving to G1GC
Copyright 2016 Kirk Pepperdine
About me

- Write and speak about performance tuning

- Offer performance tuning services and training

- created jPDM, a performance tuning methodology

- Co-founder of jClarity

- building the first generation of performance
diagnostic engines

- Java Champion since 2006
Copyright 2016 Kirk Pepperdine
G1GC will the be the default collector in Java 9
What impact might this have on
your applications performance?
Copyright 2016 Kirk Pepperdine
Questions To Be Answered

- What does a Regional heap look like?

- How does the current G1GC algorithm work?

- How does performance compare to other collectors

- What are the tools we can use the to help us;

- engage in evidence based tuning

- develop strategies so GC doesn’t interfere with
with our application’s throughput

- tune our application to work better with the
collector
Copyright 2016 Kirk Pepperdine
Generational Garbage Collection

- Mark-Sweep Copy (evacuation) for Young

- eden and survivor spaces

- both serial and parallel implementations

- Mark-Sweep (in-place) for Old space

- Serial and Parallel with compaction

- (mostly) Concurrent Mark-Sweep

- incremential mode
Copyright 2016 Kirk Pepperdine
Why another collector

- Scalability

- pause time tends to be a function of heap size

- CMS is difficult to tune

- dozens of parameters some of which are very difficult
to understand how to use

- -XX:TLABWasteTargetPercent=????

- Completely unpredictable

- well, maybe but that is a different talk
Copyright 2016 Kirk Pepperdine
G1GC

- Designed to scale

- break the pause time heap size dependency

- Easier to tune (maybe)

- fewer configuration options

- Predictable

- offer pause time goals and have the collector tune it’s
self
Copyright 2016 Kirk Pepperdine
A G1GC heap is

- 1 large contigous reserved space

- specified with -mx

- split into ~2048 regions

- size is 1, 2, 4, 8, 16, 32, or 64m

eg. -mx10G,

Region size = 10240M/2048 = 5m

reduce to 4G

Number of regions = 10G/4m = 2560
Copyright 2016 Kirk Pepperdine
Regions

- Free regions are kept on a free region list

- When in use will be tagged as;

- Eden, Survivor, Old, or Humongous
Copyright 2016 Kirk Pepperdine
Allocation

- Free regions are kept on a free region list

- mutator threads acquire a region from region free list

- tag region as Eden

- allocate object into region

- when region is full, get a new regions from free list
Eden
Eden
Eden
Eden
Copyright 2016 Kirk Pepperdine
Humongous Allocation

- allocation is larger than 1/2 a regions size

- size of a regions defines what is humongous

- allocate into a humoungous region 

- created from a set of contigous regions
Eden
Eden
Eden
Eden
Humongous
Copyright 2016 Kirk Pepperdine
Garbage Collection Triggers

- Alloted number of Eden regions have been consumed

- Unable to satisfy a Humongous allocation

- regions fragmentation

- may lead to full collection

- Heap is full

- full collection

- Metaspace threshold is reached

- full discussion beyond the scope of this talk
Copyright 2016 Kirk Pepperdine
Garbage Collection

- Young Gen is Mark-Sweep

- Mostly Concurrent-Mark of Tenured

- initial-mark included with Young-Gen collection

- concurrent-root-region-scan

- concurrent-mark

- remark

- cleanup

- concurrent-cleanup

- Mixed is mark Young, sweep Young and some tenured
Copyright 2016 Kirk Pepperdine
Reclaiming Memory (detailed)

- Mark Sweep Copy (Evacuating) Garbage Collection

- Capture all mutator threads at a safepoint

- Complete RSet refinement

- Scan for GC Roots

- Trace all references from GC roots

- mark all data reached during tracing

- Copy all marked data into a “to space”

- Reset supporting structures

- Release all mutator threads
Copyright 2016 Kirk Pepperdine
RSet

- Track all external pointers to a region

- GC roots for the region

- Expensive to update

- mutations recored to a refinement
queue

- update delegated to refinement
threads
Copyright 2016 Kirk Pepperdine
RSet Refinement

- Refinement queue is divided into 4 regions

- White: no refinement threads are working

- Green: number of cards that can be processed
without exceeding 10% of pause time

- Yellow: all refinement threads are working to keep
up

- Red: Application threads are involved in refinement
Copyright 2016 Kirk Pepperdine
CSets

- Set of all regions to be swept

- Goal is to keep pauses under MaxGCPauseMillis

- controls the size of the CSet

- CSet contain

- all Young regions

- selected Old regions during mixed collections

- number / mixed GC ratio
Copyright 2016 Kirk Pepperdine
Heap after a Mark/Sweep

- all surviving objects are copied into (to) Survivor regions

- Eden and (from) Survivor regions are returned to free
regions list
Humoungous
Survivor
Copyright 2016 Kirk Pepperdine
Promotion to Old

- Data is promoted to old

- from survivor when it reaches tenuring threshold

- to prevent survivor from being overrun

- pre-emptive or reactive
Humongous
Survivor Old
Copyright 2016 Kirk Pepperdine
Parallel Phases

- external root scanning

- updating remembered sets

- scan remembered sets

- code root scanning

- object copy

- string dedup
Copyright 2016 Kirk Pepperdine
Serial Phases

- code root fixup

- code root migration

- clear CT

- choose CSet

- Reference processing

- redirty cards

- free CSet
Copyright 2016 Kirk Pepperdine
Starting a (mostly) Concurrent Cycle

- Scheduled when heap occupancy reaches 45%

- initial-mark runs inside a Young collection

- mark calculates livelyness

- used for CSet inclusion decisions
Eden
Eden
Eden
Eden
Humoungous Survivor
Survivor
Old
OldOld
Old
Old
Old
Old
Old OldOld
Old
Old
Old
Old
Old
Copyright 2016 Kirk Pepperdine
Flags (you want to use)

-XX:+UseG1GC

-mx4G

-XX:MaxGCPauseMillis=200

-Xloggc:gc.log

-XX:+PrintGCDetails

-XX:+PrintTenuringDistribution

-XX:+PrintReferenceGC"

-XX:+PrintGCApplicationStoppedTime

-XX:+PrintGCApplicationConcurrentTime"
Copyright 2016 Kirk Pepperdine
Flags (you might want to use)

-XX:G1HeapRegionSize=1

-XX:InitiatingHeapOccupancyPercent=45

-XX:+UnlockExperimentalVMOptions"

-XX:G1NewSizePercent=5

-XX:+UnlockDiagnosticVMOptions

-XX:+G1PrintRegionLivenessInfo

-XX:SurvivorRatio=6

-XX:MaxTenuringThreshold=15
Copyright 2016 Kirk Pepperdine
Flags (you should think twice about using)

-XX:G1MixedGCCountTarget=8

-XX:+UnlockExperimentalVMOptions"

-XX:G1MixedGCLiveThresholdPercent=85/65
Copyright 2016 Kirk Pepperdine
Flags (you should never use)

-XX:+UnlockExperimentalVMOptions"

-XX:G1OldCSetRegionThresholdPercent=10

-XX:G1MaxNewSizePercent=60

-XX:G1HeapWastePercent=10

-XX:G1RSetUpdatingPauseTimePercent=10
Copyright 2016 Kirk Pepperdine
Things that give the G1 grief

- RSet refinement

- too much overhead to put work on mutator thread

- affects application throughput

- high rates of mutation place pressure on RSet
refinement

- will affect Young parallel phase and remark times

- Object copy

- not much to say here (unfortunately)
Copyright 2016 Kirk Pepperdine
Things that give the G1 grief

- Humongous allocations

- definition controlled by region size

- bigger region yields bigger RSet refinement costs

- Floating garbage

- “dead” objects in other regions keep dead objects
alive

- negative impact on object copy costs

- more aggressive ripeness settings

- most costly collections
Copyright 2016 Kirk Pepperdine
Tuning Cassandra (benchmark)

- Out of the box tuned for using CMS

- exceptionally complex set of configurations

- Reconfigured

- to run G1

- given fixed unit of work which should ideally be
cleared in 15 minutes
Goal: Configure G1 to maximize MMU
Copyright 2016 Kirk Pepperdine
Cassandra throughput running @ 100% CPU
0
17500
35000
52500
70000
1 2 3 4 5 6 7 8 9 10 11 12
CMS
G1GC
Copyright 2016 Kirk Pepperdine
Run times
00:12:35
00:14:40
00:16:45
00:18:50
00:20:55
1 2 3 4 5 6 7 8 9 10 11
Copyright 2016 Kirk Pepperdine
Weak Generational Hypothesis
Rate
Time
Copyright 2016 Kirk Pepperdine
Performance Seminar
`
www.kodewerk.com
Java
Performance Tuning,
June
2-5, Chania
Greece

More Related Content

What's hot

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
 
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
 
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
 
Tuning Java for Big Data
Tuning Java for Big DataTuning Java for Big Data
Tuning Java for Big Data
Scott Seighman
 
Gclogs j1
Gclogs j1Gclogs j1
Gclogs j1
Kirk Pepperdine
 
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
 
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
 
Garbage First Garbage Collector: Where the Rubber Meets the Road!
Garbage First Garbage Collector: Where the Rubber Meets the Road!Garbage First Garbage Collector: Where the Rubber Meets the Road!
Garbage First Garbage Collector: Where the Rubber Meets the Road!
Monica Beckwith
 
Storing Cassandra Metrics
Storing Cassandra MetricsStoring Cassandra Metrics
Storing Cassandra Metrics
Chris Lohfink
 
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
Monica Beckwith
 
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Spark Summit
 
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
 
GoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with DependenciesGoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with Dependencies
DataWorks Summit/Hadoop Summit
 
Jvm tuning for low latency application & Cassandra
Jvm tuning for low latency application & CassandraJvm tuning for low latency application & Cassandra
Jvm tuning for low latency application & Cassandra
Quentin Ambard
 
Low pause GC in HotSpot
Low pause GC in HotSpotLow pause GC in HotSpot
Low pause GC in HotSpot
jClarity
 
Jvm & Garbage collection tuning for low latencies application
Jvm & Garbage collection tuning for low latencies applicationJvm & Garbage collection tuning for low latencies application
Jvm & Garbage collection tuning for low latencies application
Quentin Ambard
 
On heap cache vs off-heap cache
On heap cache vs off-heap cacheOn heap cache vs off-heap cache
On heap cache vs off-heap cache
rgrebski
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
Vladislav Gangan
 
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
Red Hat Developers
 
Keynote: Apache HBase at Yahoo! Scale
Keynote: Apache HBase at Yahoo! ScaleKeynote: Apache HBase at Yahoo! Scale
Keynote: Apache HBase at Yahoo! Scale
HBaseCon
 

What's hot (20)

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?
 
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...
 
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
 
Tuning Java for Big Data
Tuning Java for Big DataTuning Java for Big Data
Tuning Java for Big Data
 
Gclogs j1
Gclogs j1Gclogs j1
Gclogs j1
 
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
 
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
 
Garbage First Garbage Collector: Where the Rubber Meets the Road!
Garbage First Garbage Collector: Where the Rubber Meets the Road!Garbage First Garbage Collector: Where the Rubber Meets the Road!
Garbage First Garbage Collector: Where the Rubber Meets the Road!
 
Storing Cassandra Metrics
Storing Cassandra MetricsStoring Cassandra Metrics
Storing Cassandra Metrics
 
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
 
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
Taming GC Pauses for Humongous Java Heaps in Spark Graph Computing-(Eric Kacz...
 
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 :)
 
GoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with DependenciesGoodFit: Multi-Resource Packing of Tasks with Dependencies
GoodFit: Multi-Resource Packing of Tasks with Dependencies
 
Jvm tuning for low latency application & Cassandra
Jvm tuning for low latency application & CassandraJvm tuning for low latency application & Cassandra
Jvm tuning for low latency application & Cassandra
 
Low pause GC in HotSpot
Low pause GC in HotSpotLow pause GC in HotSpot
Low pause GC in HotSpot
 
Jvm & Garbage collection tuning for low latencies application
Jvm & Garbage collection tuning for low latencies applicationJvm & Garbage collection tuning for low latencies application
Jvm & Garbage collection tuning for low latencies application
 
On heap cache vs off-heap cache
On heap cache vs off-heap cacheOn heap cache vs off-heap cache
On heap cache vs off-heap cache
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
 
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
Shenandoah GC: Java Without The Garbage Collection Hiccups (Christine Flood)
 
Keynote: Apache HBase at Yahoo! Scale
Keynote: Apache HBase at Yahoo! ScaleKeynote: Apache HBase at Yahoo! Scale
Keynote: Apache HBase at Yahoo! Scale
 

Viewers also liked

G1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and TuningG1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and Tuning
Simone Bordet
 
Enabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive ApplicationsEnabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive Applications
Azul Systems Inc.
 
Java7 Garbage Collector G1
Java7 Garbage Collector G1Java7 Garbage Collector G1
Java7 Garbage Collector G1Dmitry Buzdin
 
How to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning BattleHow to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning Battle
Capgemini
 
Introduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlIntroduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission Control
Leon Chen
 
Solving Multi-tenancy and G1GC in Apache HBase
Solving Multi-tenancy and G1GC in Apache HBase Solving Multi-tenancy and G1GC in Apache HBase
Solving Multi-tenancy and G1GC in Apache HBase
HBaseCon
 

Viewers also liked (6)

G1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and TuningG1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and Tuning
 
Enabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive ApplicationsEnabling Java in Latency-Sensitive Applications
Enabling Java in Latency-Sensitive Applications
 
Java7 Garbage Collector G1
Java7 Garbage Collector G1Java7 Garbage Collector G1
Java7 Garbage Collector G1
 
How to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning BattleHow to Become a Winner in the JVM Performance-Tuning Battle
How to Become a Winner in the JVM Performance-Tuning Battle
 
Introduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission ControlIntroduction of Java GC Tuning and Java Java Mission Control
Introduction of Java GC Tuning and Java Java Mission Control
 
Solving Multi-tenancy and G1GC in Apache HBase
Solving Multi-tenancy and G1GC in Apache HBase Solving Multi-tenancy and G1GC in Apache HBase
Solving Multi-tenancy and G1GC in Apache HBase
 

Similar to Moving to g1 gc by Kirk Pepperdine.

Tuning the g1gc
Tuning the g1gcTuning the g1gc
Tuning the g1gc
Kirk Pepperdine
 
Comparative Performance Analysis of AWS EC2 Instance Types Commonly Used for ...
Comparative Performance Analysis of AWS EC2 Instance Types Commonly Used for ...Comparative Performance Analysis of AWS EC2 Instance Types Commonly Used for ...
Comparative Performance Analysis of AWS EC2 Instance Types Commonly Used for ...
DataWorks Summit
 
Hadoop performance optimization tips
Hadoop performance optimization tipsHadoop performance optimization tips
Hadoop performance optimization tips
Subhas Kumar Ghosh
 
Pig on Tez - Low Latency ETL with Big Data
Pig on Tez - Low Latency ETL with Big DataPig on Tez - Low Latency ETL with Big Data
Pig on Tez - Low Latency ETL with Big DataDataWorks Summit
 
Performance Analysis of Lattice QCD on GPUs in APGAS Programming Model
Performance Analysis of Lattice QCD on GPUs in APGAS Programming ModelPerformance Analysis of Lattice QCD on GPUs in APGAS Programming Model
Performance Analysis of Lattice QCD on GPUs in APGAS Programming Model
Koichi Shirahata
 
Apache Spark Best Practices Meetup Talk
Apache Spark Best Practices Meetup TalkApache Spark Best Practices Meetup Talk
Apache Spark Best Practices Meetup Talk
Eren Avşaroğulları
 
JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & Diagnostics
Dhaval Shah
 
MATLAB_BIg_Data_ds_Haddop_22032015
MATLAB_BIg_Data_ds_Haddop_22032015MATLAB_BIg_Data_ds_Haddop_22032015
MATLAB_BIg_Data_ds_Haddop_22032015Asaf Ben Gal
 
Running Spark in Production
Running Spark in ProductionRunning Spark in Production
Running Spark in Production
DataWorks Summit/Hadoop Summit
 
Tuning tips for Apache Spark Jobs
Tuning tips for Apache Spark JobsTuning tips for Apache Spark Jobs
Tuning tips for Apache Spark Jobs
Samir Bessalah
 
JVM and OS Tuning for accelerating Spark application
JVM and OS Tuning for accelerating Spark applicationJVM and OS Tuning for accelerating Spark application
JVM and OS Tuning for accelerating Spark application
Tatsuhiro Chiba
 
Progress_190130
Progress_190130Progress_190130
Progress_190130
Hyo jeong Lee
 
Storm users group real time hadoop
Storm users group real time hadoopStorm users group real time hadoop
Storm users group real time hadoop
Ted Dunning
 
Storm Users Group Real Time Hadoop
Storm Users Group Real Time HadoopStorm Users Group Real Time Hadoop
Storm Users Group Real Time Hadoop
MapR Technologies
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
Kernel TLV
 
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
Haim Yadid
 
Explore big data at speed of thought with Spark 2.0 and Snappydata
Explore big data at speed of thought with Spark 2.0 and SnappydataExplore big data at speed of thought with Spark 2.0 and Snappydata
Explore big data at speed of thought with Spark 2.0 and Snappydata
Data Con LA
 
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
DataStax
 
Spark performance tuning - Maksud Ibrahimov
Spark performance tuning - Maksud IbrahimovSpark performance tuning - Maksud Ibrahimov
Spark performance tuning - Maksud Ibrahimov
Maksud Ibrahimov
 
Strava Labs: Exploring a Billion Activity Dataset from Athletes with Apache S...
Strava Labs: Exploring a Billion Activity Dataset from Athletes with Apache S...Strava Labs: Exploring a Billion Activity Dataset from Athletes with Apache S...
Strava Labs: Exploring a Billion Activity Dataset from Athletes with Apache S...
Databricks
 

Similar to Moving to g1 gc by Kirk Pepperdine. (20)

Tuning the g1gc
Tuning the g1gcTuning the g1gc
Tuning the g1gc
 
Comparative Performance Analysis of AWS EC2 Instance Types Commonly Used for ...
Comparative Performance Analysis of AWS EC2 Instance Types Commonly Used for ...Comparative Performance Analysis of AWS EC2 Instance Types Commonly Used for ...
Comparative Performance Analysis of AWS EC2 Instance Types Commonly Used for ...
 
Hadoop performance optimization tips
Hadoop performance optimization tipsHadoop performance optimization tips
Hadoop performance optimization tips
 
Pig on Tez - Low Latency ETL with Big Data
Pig on Tez - Low Latency ETL with Big DataPig on Tez - Low Latency ETL with Big Data
Pig on Tez - Low Latency ETL with Big Data
 
Performance Analysis of Lattice QCD on GPUs in APGAS Programming Model
Performance Analysis of Lattice QCD on GPUs in APGAS Programming ModelPerformance Analysis of Lattice QCD on GPUs in APGAS Programming Model
Performance Analysis of Lattice QCD on GPUs in APGAS Programming Model
 
Apache Spark Best Practices Meetup Talk
Apache Spark Best Practices Meetup TalkApache Spark Best Practices Meetup Talk
Apache Spark Best Practices Meetup Talk
 
JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & Diagnostics
 
MATLAB_BIg_Data_ds_Haddop_22032015
MATLAB_BIg_Data_ds_Haddop_22032015MATLAB_BIg_Data_ds_Haddop_22032015
MATLAB_BIg_Data_ds_Haddop_22032015
 
Running Spark in Production
Running Spark in ProductionRunning Spark in Production
Running Spark in Production
 
Tuning tips for Apache Spark Jobs
Tuning tips for Apache Spark JobsTuning tips for Apache Spark Jobs
Tuning tips for Apache Spark Jobs
 
JVM and OS Tuning for accelerating Spark application
JVM and OS Tuning for accelerating Spark applicationJVM and OS Tuning for accelerating Spark application
JVM and OS Tuning for accelerating Spark application
 
Progress_190130
Progress_190130Progress_190130
Progress_190130
 
Storm users group real time hadoop
Storm users group real time hadoopStorm users group real time hadoop
Storm users group real time hadoop
 
Storm Users Group Real Time Hadoop
Storm Users Group Real Time HadoopStorm Users Group Real Time Hadoop
Storm Users Group Real Time Hadoop
 
Introduction to DPDK
Introduction to DPDKIntroduction to DPDK
Introduction to DPDK
 
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
“Show Me the Garbage!”, Garbage Collection a Friend or a Foe
 
Explore big data at speed of thought with Spark 2.0 and Snappydata
Explore big data at speed of thought with Spark 2.0 and SnappydataExplore big data at speed of thought with Spark 2.0 and Snappydata
Explore big data at speed of thought with Spark 2.0 and Snappydata
 
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
 
Spark performance tuning - Maksud Ibrahimov
Spark performance tuning - Maksud IbrahimovSpark performance tuning - Maksud Ibrahimov
Spark performance tuning - Maksud Ibrahimov
 
Strava Labs: Exploring a Billion Activity Dataset from Athletes with Apache S...
Strava Labs: Exploring a Billion Activity Dataset from Athletes with Apache S...Strava Labs: Exploring a Billion Activity Dataset from Athletes with Apache S...
Strava Labs: Exploring a Billion Activity Dataset from Athletes with Apache S...
 

More from J On The Beach

Massively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard wayMassively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard way
J On The Beach
 
Big Data On Data You Don’t Have
Big Data On Data You Don’t HaveBig Data On Data You Don’t Have
Big Data On Data You Don’t Have
J On The Beach
 
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
J On The Beach
 
Pushing it to the edge in IoT
Pushing it to the edge in IoTPushing it to the edge in IoT
Pushing it to the edge in IoT
J On The Beach
 
Drinking from the firehose, with virtual streams and virtual actors
Drinking from the firehose, with virtual streams and virtual actorsDrinking from the firehose, with virtual streams and virtual actors
Drinking from the firehose, with virtual streams and virtual actors
J On The Beach
 
How do we deploy? From Punched cards to Immutable server pattern
How do we deploy? From Punched cards to Immutable server patternHow do we deploy? From Punched cards to Immutable server pattern
How do we deploy? From Punched cards to Immutable server pattern
J On The Beach
 
Java, Turbocharged
Java, TurbochargedJava, Turbocharged
Java, Turbocharged
J On The Beach
 
When Cloud Native meets the Financial Sector
When Cloud Native meets the Financial SectorWhen Cloud Native meets the Financial Sector
When Cloud Native meets the Financial Sector
J On The Beach
 
The big data Universe. Literally.
The big data Universe. Literally.The big data Universe. Literally.
The big data Universe. Literally.
J On The Beach
 
Streaming to a New Jakarta EE
Streaming to a New Jakarta EEStreaming to a New Jakarta EE
Streaming to a New Jakarta EE
J On The Beach
 
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
J On The Beach
 
Pushing AI to the Client with WebAssembly and Blazor
Pushing AI to the Client with WebAssembly and BlazorPushing AI to the Client with WebAssembly and Blazor
Pushing AI to the Client with WebAssembly and Blazor
J On The Beach
 
Axon Server went RAFTing
Axon Server went RAFTingAxon Server went RAFTing
Axon Server went RAFTing
J On The Beach
 
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
J On The Beach
 
Madaari : Ordering For The Monkeys
Madaari : Ordering For The MonkeysMadaari : Ordering For The Monkeys
Madaari : Ordering For The Monkeys
J On The Beach
 
Servers are doomed to fail
Servers are doomed to failServers are doomed to fail
Servers are doomed to fail
J On The Beach
 
Interaction Protocols: It's all about good manners
Interaction Protocols: It's all about good mannersInteraction Protocols: It's all about good manners
Interaction Protocols: It's all about good manners
J On The Beach
 
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
J On The Beach
 
Leadership at every level
Leadership at every levelLeadership at every level
Leadership at every level
J On The Beach
 
Machine Learning: The Bare Math Behind Libraries
Machine Learning: The Bare Math Behind LibrariesMachine Learning: The Bare Math Behind Libraries
Machine Learning: The Bare Math Behind Libraries
J On The Beach
 

More from J On The Beach (20)

Massively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard wayMassively scalable ETL in real world applications: the hard way
Massively scalable ETL in real world applications: the hard way
 
Big Data On Data You Don’t Have
Big Data On Data You Don’t HaveBig Data On Data You Don’t Have
Big Data On Data You Don’t Have
 
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
Acoustic Time Series in Industry 4.0: Improved Reliability and Cyber-Security...
 
Pushing it to the edge in IoT
Pushing it to the edge in IoTPushing it to the edge in IoT
Pushing it to the edge in IoT
 
Drinking from the firehose, with virtual streams and virtual actors
Drinking from the firehose, with virtual streams and virtual actorsDrinking from the firehose, with virtual streams and virtual actors
Drinking from the firehose, with virtual streams and virtual actors
 
How do we deploy? From Punched cards to Immutable server pattern
How do we deploy? From Punched cards to Immutable server patternHow do we deploy? From Punched cards to Immutable server pattern
How do we deploy? From Punched cards to Immutable server pattern
 
Java, Turbocharged
Java, TurbochargedJava, Turbocharged
Java, Turbocharged
 
When Cloud Native meets the Financial Sector
When Cloud Native meets the Financial SectorWhen Cloud Native meets the Financial Sector
When Cloud Native meets the Financial Sector
 
The big data Universe. Literally.
The big data Universe. Literally.The big data Universe. Literally.
The big data Universe. Literally.
 
Streaming to a New Jakarta EE
Streaming to a New Jakarta EEStreaming to a New Jakarta EE
Streaming to a New Jakarta EE
 
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
The TIPPSS Imperative for IoT - Ensuring Trust, Identity, Privacy, Protection...
 
Pushing AI to the Client with WebAssembly and Blazor
Pushing AI to the Client with WebAssembly and BlazorPushing AI to the Client with WebAssembly and Blazor
Pushing AI to the Client with WebAssembly and Blazor
 
Axon Server went RAFTing
Axon Server went RAFTingAxon Server went RAFTing
Axon Server went RAFTing
 
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
 
Madaari : Ordering For The Monkeys
Madaari : Ordering For The MonkeysMadaari : Ordering For The Monkeys
Madaari : Ordering For The Monkeys
 
Servers are doomed to fail
Servers are doomed to failServers are doomed to fail
Servers are doomed to fail
 
Interaction Protocols: It's all about good manners
Interaction Protocols: It's all about good mannersInteraction Protocols: It's all about good manners
Interaction Protocols: It's all about good manners
 
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
A race of two compilers: GraalVM JIT versus HotSpot JIT C2. Which one offers ...
 
Leadership at every level
Leadership at every levelLeadership at every level
Leadership at every level
 
Machine Learning: The Bare Math Behind Libraries
Machine Learning: The Bare Math Behind LibrariesMachine Learning: The Bare Math Behind Libraries
Machine Learning: The Bare Math Behind Libraries
 

Recently uploaded

Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
ShamsuddeenMuhammadA
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
Neo4j
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Yara Milbes
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 

Recently uploaded (20)

Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptxText-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
Text-Summarization-of-Breaking-News-Using-Fine-tuning-BART-Model.pptx
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
GraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph TechnologyGraphSummit Paris - The art of the possible with Graph Technology
GraphSummit Paris - The art of the possible with Graph Technology
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi ArabiaTop 7 Unique WhatsApp API Benefits | Saudi Arabia
Top 7 Unique WhatsApp API Benefits | Saudi Arabia
 
Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 

Moving to g1 gc by Kirk Pepperdine.

  • 1. Copyright 2016 Kirk Pepperdine Moving to G1GC
  • 2. Copyright 2016 Kirk Pepperdine About me - Write and speak about performance tuning - Offer performance tuning services and training - created jPDM, a performance tuning methodology - Co-founder of jClarity - building the first generation of performance diagnostic engines - Java Champion since 2006
  • 3. Copyright 2016 Kirk Pepperdine G1GC will the be the default collector in Java 9 What impact might this have on your applications performance?
  • 4. Copyright 2016 Kirk Pepperdine Questions To Be Answered - What does a Regional heap look like? - How does the current G1GC algorithm work? - How does performance compare to other collectors - What are the tools we can use the to help us; - engage in evidence based tuning - develop strategies so GC doesn’t interfere with with our application’s throughput - tune our application to work better with the collector
  • 5. Copyright 2016 Kirk Pepperdine Generational Garbage Collection - Mark-Sweep Copy (evacuation) for Young - eden and survivor spaces - both serial and parallel implementations - Mark-Sweep (in-place) for Old space - Serial and Parallel with compaction - (mostly) Concurrent Mark-Sweep - incremential mode
  • 6. Copyright 2016 Kirk Pepperdine Why another collector - Scalability - pause time tends to be a function of heap size - CMS is difficult to tune - dozens of parameters some of which are very difficult to understand how to use - -XX:TLABWasteTargetPercent=???? - Completely unpredictable - well, maybe but that is a different talk
  • 7. Copyright 2016 Kirk Pepperdine G1GC - Designed to scale - break the pause time heap size dependency - Easier to tune (maybe) - fewer configuration options - Predictable - offer pause time goals and have the collector tune it’s self
  • 8. Copyright 2016 Kirk Pepperdine A G1GC heap is - 1 large contigous reserved space - specified with -mx - split into ~2048 regions - size is 1, 2, 4, 8, 16, 32, or 64m eg. -mx10G, Region size = 10240M/2048 = 5m reduce to 4G Number of regions = 10G/4m = 2560
  • 9. Copyright 2016 Kirk Pepperdine Regions - Free regions are kept on a free region list - When in use will be tagged as; - Eden, Survivor, Old, or Humongous
  • 10. Copyright 2016 Kirk Pepperdine Allocation - Free regions are kept on a free region list - mutator threads acquire a region from region free list - tag region as Eden - allocate object into region - when region is full, get a new regions from free list Eden Eden Eden Eden
  • 11. Copyright 2016 Kirk Pepperdine Humongous Allocation - allocation is larger than 1/2 a regions size - size of a regions defines what is humongous - allocate into a humoungous region - created from a set of contigous regions Eden Eden Eden Eden Humongous
  • 12. Copyright 2016 Kirk Pepperdine Garbage Collection Triggers - Alloted number of Eden regions have been consumed - Unable to satisfy a Humongous allocation - regions fragmentation - may lead to full collection - Heap is full - full collection - Metaspace threshold is reached - full discussion beyond the scope of this talk
  • 13. Copyright 2016 Kirk Pepperdine Garbage Collection - Young Gen is Mark-Sweep - Mostly Concurrent-Mark of Tenured - initial-mark included with Young-Gen collection - concurrent-root-region-scan - concurrent-mark - remark - cleanup - concurrent-cleanup - Mixed is mark Young, sweep Young and some tenured
  • 14. Copyright 2016 Kirk Pepperdine Reclaiming Memory (detailed) - Mark Sweep Copy (Evacuating) Garbage Collection - Capture all mutator threads at a safepoint - Complete RSet refinement - Scan for GC Roots - Trace all references from GC roots - mark all data reached during tracing - Copy all marked data into a “to space” - Reset supporting structures - Release all mutator threads
  • 15. Copyright 2016 Kirk Pepperdine RSet - Track all external pointers to a region - GC roots for the region - Expensive to update - mutations recored to a refinement queue - update delegated to refinement threads
  • 16. Copyright 2016 Kirk Pepperdine RSet Refinement - Refinement queue is divided into 4 regions - White: no refinement threads are working - Green: number of cards that can be processed without exceeding 10% of pause time - Yellow: all refinement threads are working to keep up - Red: Application threads are involved in refinement
  • 17. Copyright 2016 Kirk Pepperdine CSets - Set of all regions to be swept - Goal is to keep pauses under MaxGCPauseMillis - controls the size of the CSet - CSet contain - all Young regions - selected Old regions during mixed collections - number / mixed GC ratio
  • 18. Copyright 2016 Kirk Pepperdine Heap after a Mark/Sweep - all surviving objects are copied into (to) Survivor regions - Eden and (from) Survivor regions are returned to free regions list Humoungous Survivor
  • 19. Copyright 2016 Kirk Pepperdine Promotion to Old - Data is promoted to old - from survivor when it reaches tenuring threshold - to prevent survivor from being overrun - pre-emptive or reactive Humongous Survivor Old
  • 20. Copyright 2016 Kirk Pepperdine Parallel Phases - external root scanning - updating remembered sets - scan remembered sets - code root scanning - object copy - string dedup
  • 21. Copyright 2016 Kirk Pepperdine Serial Phases - code root fixup - code root migration - clear CT - choose CSet - Reference processing - redirty cards - free CSet
  • 22. Copyright 2016 Kirk Pepperdine Starting a (mostly) Concurrent Cycle - Scheduled when heap occupancy reaches 45% - initial-mark runs inside a Young collection - mark calculates livelyness - used for CSet inclusion decisions Eden Eden Eden Eden Humoungous Survivor Survivor Old OldOld Old Old Old Old Old OldOld Old Old Old Old Old
  • 23. Copyright 2016 Kirk Pepperdine Flags (you want to use) -XX:+UseG1GC -mx4G -XX:MaxGCPauseMillis=200 -Xloggc:gc.log -XX:+PrintGCDetails -XX:+PrintTenuringDistribution -XX:+PrintReferenceGC" -XX:+PrintGCApplicationStoppedTime -XX:+PrintGCApplicationConcurrentTime"
  • 24. Copyright 2016 Kirk Pepperdine Flags (you might want to use) -XX:G1HeapRegionSize=1 -XX:InitiatingHeapOccupancyPercent=45 -XX:+UnlockExperimentalVMOptions" -XX:G1NewSizePercent=5 -XX:+UnlockDiagnosticVMOptions -XX:+G1PrintRegionLivenessInfo -XX:SurvivorRatio=6 -XX:MaxTenuringThreshold=15
  • 25. Copyright 2016 Kirk Pepperdine Flags (you should think twice about using) -XX:G1MixedGCCountTarget=8 -XX:+UnlockExperimentalVMOptions" -XX:G1MixedGCLiveThresholdPercent=85/65
  • 26. Copyright 2016 Kirk Pepperdine Flags (you should never use) -XX:+UnlockExperimentalVMOptions" -XX:G1OldCSetRegionThresholdPercent=10 -XX:G1MaxNewSizePercent=60 -XX:G1HeapWastePercent=10 -XX:G1RSetUpdatingPauseTimePercent=10
  • 27. Copyright 2016 Kirk Pepperdine Things that give the G1 grief - RSet refinement - too much overhead to put work on mutator thread - affects application throughput - high rates of mutation place pressure on RSet refinement - will affect Young parallel phase and remark times - Object copy - not much to say here (unfortunately)
  • 28. Copyright 2016 Kirk Pepperdine Things that give the G1 grief - Humongous allocations - definition controlled by region size - bigger region yields bigger RSet refinement costs - Floating garbage - “dead” objects in other regions keep dead objects alive - negative impact on object copy costs - more aggressive ripeness settings - most costly collections
  • 29. Copyright 2016 Kirk Pepperdine Tuning Cassandra (benchmark) - Out of the box tuned for using CMS - exceptionally complex set of configurations - Reconfigured - to run G1 - given fixed unit of work which should ideally be cleared in 15 minutes Goal: Configure G1 to maximize MMU
  • 30. Copyright 2016 Kirk Pepperdine Cassandra throughput running @ 100% CPU 0 17500 35000 52500 70000 1 2 3 4 5 6 7 8 9 10 11 12 CMS G1GC
  • 31. Copyright 2016 Kirk Pepperdine Run times 00:12:35 00:14:40 00:16:45 00:18:50 00:20:55 1 2 3 4 5 6 7 8 9 10 11
  • 32. Copyright 2016 Kirk Pepperdine Weak Generational Hypothesis Rate Time
  • 33. Copyright 2016 Kirk Pepperdine Performance Seminar ` www.kodewerk.com Java Performance Tuning, June 2-5, Chania Greece