SlideShare una empresa de Scribd logo
1 de 56
G1 Garbage Collector




Jaromir Hamala <jhamala@c2b2.co.uk>
           Senior Consultant
                 C2B2
         @c2b2consulting
Jaromir Hamala
 Who Am I?
 ■ A curious developer
 ■ Who likes to know more
    ■ About computers
    ■ World
    ■ And beer!




                            3
Agenda
 Memory Management
 Garbage Collectors in JVM
 CMS vs. G1
 G1 Tuning
 Recommendations
Manual Memory Management I
   Not all the memory is yours!
   You need to ask for it
         malloc() -> sbrk()

   And return when you no
    longer need it
          free() -> sbrk()




                                   5
Manual Memory Management II
   Asking for something is easy

   Returning is way more
    complicated!



          (we all know it!)




                                   6
Garbage Collector I
A little bit of history
     3000 B.C. – “The first landfill is
      developed when Knossos,
      Crete digs large holes for
      refuse. Garbage is dumped
      and filled with dirt at various
      levels.”
     In LISP from end of „50s!
     In Java from the 1st version



                                           8
Requirements on GC
  High Throughput
  Low Latency
  Minimal Footprint
  Reliable
  Easy to use/tune
Generational Hypothesis
  Most objects die young

  Old objects rarely reference young objects
Generational Garbage Collector
  Split the heap into regions
  Create new objects in Young
  Move mature objects to Old

  Different strategies for different regions
Characteristics of GCs
  Concurrent
  Parallel
  Compacting
Concurrent GC
Parallel GC
Heap Fragmentation
Heap Compacted
What we have in JVM? I
  Serial GC
  Parallel GC
What we have in JVM? II
  CMS
  G1
    since 6u14
    supported since 7u4
How CMS works in young generation II
How CMS works in young generation II
How CMS works in old generation
  Main phases of CMS:
    Initial Mark (STW)
    Concurrent Mark
    Remark (STW)
    Concurrent Sweep

  Features:
     Continuous block of memory
     No compacting!
Heap Fragmentation
What‟s the catch?
  Fragmentation
  Remark phase (STW)      “It’s working very well except
  Very Large Heaps              when it’s not”. –M. Brasier


 Promotion Failure
 Concurrent Mode Failure
Stop The World
G1
 Concurrent
 Parallel
 Compacting
G1 Goals
  Low Latency
  Better Predictability
  Easy to use & tune
G1 Heap Layout
  Heap divided into +- 2000 regions of equal
   size
  No physical separation between young /
   old generation
  Each region can be either young or old

  Object moved between regions during
   collections


  Humongous Region
    For large objects
    Expensive collecting as of now!
G1 Young Generation GC
G1 Old Generation GC I.
  Combination of CMS and Parallel Compacting GC
  Concurrent Marking Phase
  Remark still STW
     1929.299: [GC remark 1929.299: [GC ref-proc, 0.0048180 secs], 0.0258670 secs]
       [Times: user=0.03 sys=0.00, real=0.02 secs]
  Initial Marking part of evacuation pause
     62.583: [GC pause (young) (initial-mark), 0.09812400 secs]
    Calculating statistics data
      Ratio of living objects inside region
      Who references our region
G1 Old Generation GC II.
  Regions with no living
   objects can be
   reclaimed immediately
   (after remark)
G1 Old Generation GC III.
  Regions with smallest
   ratio of living objects
   chosen to evacuate
   during next GC
 53.695: [GC pause
 (mixed), 0.05568800 secs]
G1 Old Generation GC IV.
  Concurrent Marking Phase
    Calculate liveness ratio
    Find best regions to evacuate

  Reclaming Regions
    After Remark
    During evacuation pause
Remember Set
 Structure to track references from other
  regions
 One per region
 Allows to collects objects without tracking
  whole heap to find references
 Maintenance based on write barrier

            There is no free lunch!
Gotcha! (Part I.)
  More inter-region references -> Bigger
   Remember Set
  Large Remember Set -> Slow G1

  Remember: Large Object -> Humongous
   Region -> Collecting not optimized as yet
G1 Tuning Fundamentals
  Main goal of G1 is a low latency              -XX:+UseCMSInitiatingOccupancyOnly

  If you can tolerate latency use Parallel GC   -XX:CMSInitiatingOccupancyFraction=60

  Another goal is simplicity (of tuning)        -XX:CMSTriggerRatio=60
                                                 -XX:CMSWaitDuration=1500
                                                 -XX:ConcGCThreads=2
  Most important tuning option:                 -XX:SurvivorRatio=8
        -XX:MaxGCPauseMillis=300                 -Xmn1g
  Influence maximum amount of work per          ….
   collection
  No hard promise
  Best effort only
Other Import Tuning Options I
 -XX:InitiatingHeapOccupancyPercent=n
  When to start a concurrent GC cycle
  Percent of an entire heap, not just old
   geneneration!


    Too Low -> Unnecessary GC overhead
   Too High -> “Space Overflow” -> Full GC
Other Import Tuning Options II
 -XX:G1OldCSetRegionLiveThresholdPercent=n
  Threshold for region to be included in a
   Collection Set


  To High -> More aggressive collecting
     More live objects to copy
  To Low -> Wasting some heap
Other Import Tuning Options III
 -XX:G1MixedGCCountTarget=n
  How many Mixed GC / Concurrent Cycle

  To High -> Unnecessary overhead
  To Low -> Longer pauses
Considerations Before Tuning
  Some options cause your
   PauseTimeTarget to be ignored!
                    -Xmn
  Fixed young generation size
Logging the GC Activity
  Verbose GC is your friend!
 -XX:+PrintGC -XX:+PrintGCDetails -
 XX:+PrintGCTimeStamps
  Always use it! Even in production.
  Very low overhead. There is no excuse!

  Will help you analyze help your GC is
   performing
G1 GC Log
1.297: [GC pause (young), 0.02828800 secs]
  [Parallel Time:   24.2 ms]
      [GC Worker Start (ms):    1296.7    1302.7
       Avg: 1299.7, Min: 1296.7, Max: 1302.7, Diff:       6.0]
      [Ext Root Scanning (ms):    16.5    2.9
       Avg:   9.7, Min:    2.9, Max:     16.5, Diff:   13.6]
      [Update RS (ms):    0.0   0.0
       Avg:   0.0, Min:    0.0, Max:     0.0, Diff:    0.0]
        [Processed Buffers : 0 9
          Sum: 9, Avg: 4, Min: 0, Max: 9, Diff: 9]
[…]
G1 GC Log
1.297: [GC pause (young), 0.02828800 secs]
   Young GC
   Started 1.297s from the start of JVM
   Total elapsed time was 0.02828800s
[Parallel Time:    24.2 ms]
   Total   elapsed time spent by parallel GC thread
G1 GC Log
[GC Worker Start (ms):      1296.7        1302.7
        Avg: 1299.7, Min: 1296.7, Max: 1302.7, Diff:              6.0]
 Two threads and starting times

 [Ext Root Scanning (ms):          16.5   2.9
        Avg:    9.7, Min:      2.9, Max:        16.5, Diff:   13.6]
 Time spent by each thread by scanning the roots
G1 GC Log
[Update RS (ms):      0.0    0.0
        Avg:     0.0, Min:        0.0, Max:    0.0, Diff:        0.0]
           [Processed Buffers : 0 9
            Sum: 9, Avg: 4, Min: 0, Max: 9, Diff: 9]
 Time spent by updating Remember Sets regions
 Update Buffers is a structure tracking changes in references

[Scan RS (ms):     0.0      0.1
        Avg:     0.0, Min:         0.0, Max:   0.1, Diff:        0.1].
 Time spent by scanning areas from Remember Set
G1 GC Log
[Object Copy (ms):      7.6   15.1
        Avg:   11.3, Min:      7.6, Max:      15.1, Diff:   7.5]
 Time spent by copying objects to other regions
 Usually significant portion of a total time

[Termination (ms):      0.0   0.0
        Avg:     0.0, Min:     0.0, Max:       0.0, Diff:   0.0]
          [Termination Attempts : 1 1
            Sum: 2, Avg: 1, Min: 1, Max: 1, Diff: 0]
 Time spent by offering to terminate
 Threads are stealing work from the others
G1 Logging Options I
  -XX:+PrintAdaptiveSizePolicy
 53.628: [GC pause (mixed) 53.628: [G1Ergonomics (CSet Construction) start choosing CSet, predicted
 base time: 54.79 ms, remaining time: 145.21 ms, target pause time: 200.00 ms]
  53.628: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 51 regions, survivors:
 2 regions, predicted young region time: 9.75 ms]
  53.628: [G1Ergonomics (CSet Construction) finish adding old regions to CSet, reason: old CSet
 region num reached max, old: 27 regions, max: 27 regions]
  53.628: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 51 regions, survivors: 2
 regions, old: 27 regions, predicted pause time: 131.56 ms, target pause time: 200.00 ms]
  53.700: [G1Ergonomics (Concurrent Cycles) do not request concurrent cycle initiation, reason:
 still doing mixed collections, occupancy: 127926272 bytes, allocation request: 0 bytes, threshold:
 125986365 bytes (45.00 %), source: end of GC]
G1 Evacuation Failure
  Evacuation Failure Happens when we do not have empty regions
  Heap is already at maximum size
  Very expensive operation!
  Search for “to-space overflow”

  Remedy:
    Increase to heap size
    -XX:InitiatingHeapOccupancyPercent=
    More marking threads
Is G1 Production Ready?
  It depends!
     Well, some people use it in production
  The days of G1 crashing JVM are hopefully over
  Still quite significant changes
  Bugs are still being found
     Bug 7181612 : G1: Premature Evacuation (7143858) strikes again
     Bug 7143858 : G1: Back to back young GCs with the second GC having a minimally
     sized eden


  You should probably evaluate/use G1 when everything else is failing
  And you have no alternative!
GC Decisioning: Rules of Thumb I
  Do I really need a Low Latency
    No? Use Parallel GC
  Do I really need a Big Heap?
    Yes? Think again!

  Do I really need a Big Heap?
    No? Use small heap & Parallel GC
    Yes? Try CMS 1st
GC Decisioning: Rules of Thumb II
  Is CMS performing well?
     Yes? Done!
     No? Tune it!
  Is tuned CMS performing well?
     Yes? Done!
     No? Tune it more!
  Is CMS performing well now?
     Yes? Done!
     No? Do you really need such big heap?
GC Decisioning: Rules of Thumb III
  Yes, I really need a Big Heap a Low Pauses!
    This is the moment where you should start considering to use G1!

  In Nutshell:
     For now treat G1 as a last resort
     When other GCs are failing
     Be aware of gotchas:
       Very Large Objects
       Large Remember Sets
       Footprint?
     Test carefully before using in a production!
G1 – Recent Commits
 date:      Tue Oct 30 11:45:51 2012 -0700
 summary:     7200261: G1: Liveness counting inconsistencies during marking verification


 date:      Thu Sep 20 09:52:56 2012 -0700
 summary:     7190666: G1: assert(_unused == 0) failed: Inconsistency in PLAB stats


 date:      Tue Aug 21 14:10:39 2012 -0700
 summary:     7185699: G1: Prediction model discrepancies
G1 – Recent Commits – Conclusion?
  Do not use anything before 7u4
    Use 7u9 or later
    The latest version in the best case

  Do not use G1 from Java 6
What Are The Alternatives?
  Workaround / Hacks:

  Off Heap Allocations
    DirectBuffers
    JNI

  Object Pooling
Further Resources
  JavaOne 2012 G1 Talk, Charlie Hunt, Monica Beckwith
  hotstop-gc-use mailinglist
  http://www.quora.com/What-is-the-status-of-the-implementation-of-the-G1-garbage-
   collector-for-the-JVM#
  ….
Q&A

Más contenido relacionado

La actualidad más candente

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
 
G1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and TuningG1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and TuningSimone Bordet
 
Tuning Java for Big Data
Tuning Java for Big DataTuning Java for Big Data
Tuning Java for Big DataScott Seighman
 
Low pause GC in HotSpot
Low pause GC in HotSpotLow pause GC in HotSpot
Low pause GC in HotSpotjClarity
 
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
 
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
 
Storing Cassandra Metrics
Storing Cassandra MetricsStoring Cassandra Metrics
Storing Cassandra MetricsChris Lohfink
 
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
 
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
 
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
 
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
 
GC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 PresentationGC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 PresentationLudovic Poitou
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection TuningKai Koenig
 
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
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesSergey Podolsky
 
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
 
JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & DiagnosticsDhaval Shah
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvmPrem Kuppumani
 

La actualidad más candente (20)

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
 
G1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and TuningG1 Garbage Collector: Details and Tuning
G1 Garbage Collector: Details and Tuning
 
Tuning Java for Big Data
Tuning Java for Big DataTuning Java for Big Data
Tuning Java for Big Data
 
Low pause GC in HotSpot
Low pause GC in HotSpotLow pause GC in HotSpot
Low pause GC in HotSpot
 
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...
 
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
 
Storing Cassandra Metrics
Storing Cassandra MetricsStoring Cassandra Metrics
Storing Cassandra Metrics
 
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
 
Basics of JVM Tuning
Basics of JVM TuningBasics of JVM Tuning
Basics of JVM Tuning
 
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
 
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!
 
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
 
GC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 PresentationGC Tuning in the HotSpot Java VM - a FISL 10 Presentation
GC Tuning in the HotSpot Java VM - a FISL 10 Presentation
 
JVM and Garbage Collection Tuning
JVM and Garbage Collection TuningJVM and Garbage Collection Tuning
JVM and Garbage Collection Tuning
 
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 :)
 
Moving to G1GC
Moving to G1GCMoving to G1GC
Moving to G1GC
 
Tuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issuesTuning Java GC to resolve performance issues
Tuning Java GC to resolve performance issues
 
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)
 
JVM memory management & Diagnostics
JVM memory management & DiagnosticsJVM memory management & Diagnostics
JVM memory management & Diagnostics
 
Performance tuning jvm
Performance tuning jvmPerformance tuning jvm
Performance tuning jvm
 

Destacado

Programming WebSockets with Glassfish and Grizzly
Programming WebSockets with Glassfish and GrizzlyProgramming WebSockets with Glassfish and Grizzly
Programming WebSockets with Glassfish and GrizzlyC2B2 Consulting
 
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBaseHBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBaseHBaseCon
 
Software Developers Guide to Fun in the Workplace: Euphoria Despite the Despair
Software Developers Guide to Fun in the Workplace: Euphoria Despite the DespairSoftware Developers Guide to Fun in the Workplace: Euphoria Despite the Despair
Software Developers Guide to Fun in the Workplace: Euphoria Despite the DespairHolly Cummins
 
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 BattleCapgemini
 
Introduction to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQueryachinth
 
Garbage collection
Garbage collectionGarbage collection
Garbage collectionMudit Gupta
 
Mark and sweep algorithm(garbage collector)
Mark and sweep algorithm(garbage collector)Mark and sweep algorithm(garbage collector)
Mark and sweep algorithm(garbage collector)Ashish Jha
 
Garbage Collection Pause Times - Angelika Langer
Garbage Collection Pause Times - Angelika LangerGarbage Collection Pause Times - Angelika Langer
Garbage Collection Pause Times - Angelika LangerJAXLondon_Conference
 
Garbage collection
Garbage collectionGarbage collection
Garbage collectionSomya Bagai
 
Garbage collection algorithms
Garbage collection algorithmsGarbage collection algorithms
Garbage collection algorithmsachinth
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage CollectionAzul Systems Inc.
 
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 ControlLeon Chen
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage CollectionHaim Yadid
 
Basic Garbage Collection Techniques
Basic  Garbage  Collection  TechniquesBasic  Garbage  Collection  Techniques
Basic Garbage Collection TechniquesAn Khuong
 
Understanding Garbage Collection
Understanding Garbage CollectionUnderstanding Garbage Collection
Understanding Garbage CollectionDoug Hawkins
 

Destacado (19)

Programming WebSockets with Glassfish and Grizzly
Programming WebSockets with Glassfish and GrizzlyProgramming WebSockets with Glassfish and Grizzly
Programming WebSockets with Glassfish and Grizzly
 
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBaseHBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
HBaseCon 2015: Taming GC Pauses for Large Java Heap in HBase
 
Software Developers Guide to Fun in the Workplace: Euphoria Despite the Despair
Software Developers Guide to Fun in the Workplace: Euphoria Despite the DespairSoftware Developers Guide to Fun in the Workplace: Euphoria Despite the Despair
Software Developers Guide to Fun in the Workplace: Euphoria Despite the Despair
 
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 to jQuery
Introduction to jQueryIntroduction to jQuery
Introduction to jQuery
 
Garbage collection
Garbage collectionGarbage collection
Garbage collection
 
Mark and sweep algorithm(garbage collector)
Mark and sweep algorithm(garbage collector)Mark and sweep algorithm(garbage collector)
Mark and sweep algorithm(garbage collector)
 
Garbage Collection Pause Times - Angelika Langer
Garbage Collection Pause Times - Angelika LangerGarbage Collection Pause Times - Angelika Langer
Garbage Collection Pause Times - Angelika Langer
 
Heap Management
Heap ManagementHeap Management
Heap Management
 
Garbage collection
Garbage collectionGarbage collection
Garbage collection
 
Garbage collection algorithms
Garbage collection algorithmsGarbage collection algorithms
Garbage collection algorithms
 
How long can you afford to Stop The World?
How long can you afford to Stop The World?How long can you afford to Stop The World?
How long can you afford to Stop The World?
 
Understanding Java Garbage Collection
Understanding Java Garbage CollectionUnderstanding Java Garbage Collection
Understanding Java Garbage Collection
 
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
 
Java GC
Java GCJava GC
Java GC
 
Let's talk about Garbage Collection
Let's talk about Garbage CollectionLet's talk about Garbage Collection
Let's talk about Garbage Collection
 
Basic Garbage Collection Techniques
Basic  Garbage  Collection  TechniquesBasic  Garbage  Collection  Techniques
Basic Garbage Collection Techniques
 
Understanding Garbage Collection
Understanding Garbage CollectionUnderstanding Garbage Collection
Understanding Garbage Collection
 

Similar a G1 Garbage Collector - Big Heaps and Low Pauses?

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
 
Taming Java Garbage Collector
Taming Java Garbage CollectorTaming Java Garbage Collector
Taming Java Garbage CollectorDaya Atapattu
 
Become a Garbage Collection Hero
Become a Garbage Collection HeroBecome a Garbage Collection Hero
Become a Garbage Collection HeroTier1app
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and youKai Koenig
 
Garbage First and You!
Garbage First and You!Garbage First and You!
Garbage First and You!devObjective
 
Pick diamonds from garbage
Pick diamonds from garbagePick diamonds from garbage
Pick diamonds from garbageTier1 App
 
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCHadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCErik Krogen
 
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 applicationQuentin Ambard
 
Become a GC Hero
Become a GC HeroBecome a GC Hero
Become a GC HeroTier1app
 
Gc and-pagescan-attacks-by-linux
Gc and-pagescan-attacks-by-linuxGc and-pagescan-attacks-by-linux
Gc and-pagescan-attacks-by-linuxCuong Tran
 
Become a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceBecome a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceTier1app
 
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 & CassandraQuentin Ambard
 
Exploring Garbage Collection
Exploring Garbage CollectionExploring Garbage Collection
Exploring Garbage CollectionESUG
 
this-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptxthis-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptxTier1 app
 
“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 FoeHaim Yadid
 

Similar a G1 Garbage Collector - Big Heaps and Low Pauses? (20)

Hotspot gc
Hotspot gcHotspot gc
Hotspot gc
 
Am I reading GC logs Correctly?
Am I reading GC logs Correctly?Am I reading GC logs Correctly?
Am I reading GC logs Correctly?
 
Taming Java Garbage Collector
Taming Java Garbage CollectorTaming Java Garbage Collector
Taming Java Garbage Collector
 
Become a Garbage Collection Hero
Become a Garbage Collection HeroBecome a Garbage Collection Hero
Become a Garbage Collection Hero
 
Garbage First and you
Garbage First and youGarbage First and you
Garbage First and you
 
Garbage First and You!
Garbage First and You!Garbage First and You!
Garbage First and You!
 
Garbage First & You
Garbage First & YouGarbage First & You
Garbage First & You
 
Pick diamonds from garbage
Pick diamonds from garbagePick diamonds from garbage
Pick diamonds from garbage
 
JVM Magic
JVM MagicJVM Magic
JVM Magic
 
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GCHadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
Hadoop Meetup Jan 2019 - Dynamometer and a Case Study in NameNode GC
 
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
 
Become a GC Hero
Become a GC HeroBecome a GC Hero
Become a GC Hero
 
Tp cms-g1-v4
Tp cms-g1-v4Tp cms-g1-v4
Tp cms-g1-v4
 
Gc and-pagescan-attacks-by-linux
Gc and-pagescan-attacks-by-linuxGc and-pagescan-attacks-by-linux
Gc and-pagescan-attacks-by-linux
 
Become a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo ConferenceBecome a Java GC Hero - ConFoo Conference
Become a Java GC Hero - ConFoo Conference
 
[BGOUG] Java GC - Friend or Foe
[BGOUG] Java GC - Friend or Foe[BGOUG] Java GC - Friend or Foe
[BGOUG] Java GC - Friend or Foe
 
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
 
Exploring Garbage Collection
Exploring Garbage CollectionExploring Garbage Collection
Exploring Garbage Collection
 
this-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptxthis-is-garbage-talk-2022.pptx
this-is-garbage-talk-2022.pptx
 
“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
 

Más de C2B2 Consulting

Monitoring Oracle SOA Suite - UKOUG Tech15 2015
Monitoring Oracle SOA Suite - UKOUG Tech15 2015Monitoring Oracle SOA Suite - UKOUG Tech15 2015
Monitoring Oracle SOA Suite - UKOUG Tech15 2015C2B2 Consulting
 
Hands-on Performance Tuning Lab - Devoxx Poland
Hands-on Performance Tuning Lab - Devoxx PolandHands-on Performance Tuning Lab - Devoxx Poland
Hands-on Performance Tuning Lab - Devoxx PolandC2B2 Consulting
 
Monitoring Oracle SOA Suite
Monitoring Oracle SOA SuiteMonitoring Oracle SOA Suite
Monitoring Oracle SOA SuiteC2B2 Consulting
 
Advanced queries on the Infinispan Data Grid
Advanced queries on the Infinispan Data Grid Advanced queries on the Infinispan Data Grid
Advanced queries on the Infinispan Data Grid C2B2 Consulting
 
Building WebLogic Domains With WLST
Building WebLogic Domains With WLSTBuilding WebLogic Domains With WLST
Building WebLogic Domains With WLSTC2B2 Consulting
 
Hands-on Performance Workshop - The science of performance
Hands-on Performance Workshop - The science of performanceHands-on Performance Workshop - The science of performance
Hands-on Performance Workshop - The science of performanceC2B2 Consulting
 
Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!C2B2 Consulting
 
JBoss Clustering on OpenShift
JBoss Clustering on OpenShiftJBoss Clustering on OpenShift
JBoss Clustering on OpenShiftC2B2 Consulting
 
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...C2B2 Consulting
 
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at ScaleOracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at ScaleC2B2 Consulting
 
Java Middleware Surgery
Java Middleware Surgery Java Middleware Surgery
Java Middleware Surgery C2B2 Consulting
 
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...C2B2 Consulting
 
'Deploying with GlassFish & Docker'
'Deploying with GlassFish & Docker' 'Deploying with GlassFish & Docker'
'Deploying with GlassFish & Docker' C2B2 Consulting
 
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit' 'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit' C2B2 Consulting
 
'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel DeakinC2B2 Consulting
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webC2B2 Consulting
 
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleJUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleC2B2 Consulting
 

Más de C2B2 Consulting (20)

Monitoring Oracle SOA Suite - UKOUG Tech15 2015
Monitoring Oracle SOA Suite - UKOUG Tech15 2015Monitoring Oracle SOA Suite - UKOUG Tech15 2015
Monitoring Oracle SOA Suite - UKOUG Tech15 2015
 
Hands-on Performance Tuning Lab - Devoxx Poland
Hands-on Performance Tuning Lab - Devoxx PolandHands-on Performance Tuning Lab - Devoxx Poland
Hands-on Performance Tuning Lab - Devoxx Poland
 
Monitoring Oracle SOA Suite
Monitoring Oracle SOA SuiteMonitoring Oracle SOA Suite
Monitoring Oracle SOA Suite
 
Advanced queries on the Infinispan Data Grid
Advanced queries on the Infinispan Data Grid Advanced queries on the Infinispan Data Grid
Advanced queries on the Infinispan Data Grid
 
Through the JMX Window
Through the JMX WindowThrough the JMX Window
Through the JMX Window
 
Building WebLogic Domains With WLST
Building WebLogic Domains With WLSTBuilding WebLogic Domains With WLST
Building WebLogic Domains With WLST
 
Hands-on Performance Workshop - The science of performance
Hands-on Performance Workshop - The science of performanceHands-on Performance Workshop - The science of performance
Hands-on Performance Workshop - The science of performance
 
Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!Jsr107 come, code, cache, compute!
Jsr107 come, code, cache, compute!
 
JBoss Clustering on OpenShift
JBoss Clustering on OpenShiftJBoss Clustering on OpenShift
JBoss Clustering on OpenShift
 
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
Dr. Low Latency or: How I Learned to Stop Worrying about Pauses and Love the ...
 
Through the JMX Window
Through the JMX WindowThrough the JMX Window
Through the JMX Window
 
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at ScaleOracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
Oracle Coherence & WebLogic 12c Web Sockets: Delivering Real Time Push at Scale
 
Java Middleware Surgery
Java Middleware Surgery Java Middleware Surgery
Java Middleware Surgery
 
Jax London 2013
Jax London 2013Jax London 2013
Jax London 2013
 
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...
Oracle SOA Suite Performance Tuning- UKOUG Application Server & Middleware SI...
 
'Deploying with GlassFish & Docker'
'Deploying with GlassFish & Docker' 'Deploying with GlassFish & Docker'
'Deploying with GlassFish & Docker'
 
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit' 'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
'JMS @ Data Grid? Hacking the Glassfish messaging for fun & profit'
 
'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin'New JMS features in GlassFish 4.0' by Nigel Deakin
'New JMS features in GlassFish 4.0' by Nigel Deakin
 
Coherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-webCoherence sig-nfr-web-tier-scaling-using-coherence-web
Coherence sig-nfr-web-tier-scaling-using-coherence-web
 
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at ScaleJUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
JUDCon 2013- JBoss Data Grid and WebSockets: Delivering Real Time Push at Scale
 

Último

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Último (20)

04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

G1 Garbage Collector - Big Heaps and Low Pauses?

  • 1.
  • 2. G1 Garbage Collector Jaromir Hamala <jhamala@c2b2.co.uk> Senior Consultant C2B2 @c2b2consulting
  • 3. Jaromir Hamala Who Am I? ■ A curious developer ■ Who likes to know more ■ About computers ■ World ■ And beer! 3
  • 4. Agenda  Memory Management  Garbage Collectors in JVM  CMS vs. G1  G1 Tuning  Recommendations
  • 5. Manual Memory Management I  Not all the memory is yours!  You need to ask for it malloc() -> sbrk()  And return when you no longer need it free() -> sbrk() 5
  • 6. Manual Memory Management II  Asking for something is easy  Returning is way more complicated! (we all know it!) 6
  • 8. A little bit of history  3000 B.C. – “The first landfill is developed when Knossos, Crete digs large holes for refuse. Garbage is dumped and filled with dirt at various levels.”  In LISP from end of „50s!  In Java from the 1st version 8
  • 9. Requirements on GC  High Throughput  Low Latency  Minimal Footprint  Reliable  Easy to use/tune
  • 10. Generational Hypothesis  Most objects die young  Old objects rarely reference young objects
  • 11. Generational Garbage Collector  Split the heap into regions  Create new objects in Young  Move mature objects to Old  Different strategies for different regions
  • 12. Characteristics of GCs  Concurrent  Parallel  Compacting
  • 17. What we have in JVM? I  Serial GC  Parallel GC
  • 18. What we have in JVM? II  CMS  G1  since 6u14  supported since 7u4
  • 19. How CMS works in young generation II
  • 20. How CMS works in young generation II
  • 21. How CMS works in old generation  Main phases of CMS:  Initial Mark (STW)  Concurrent Mark  Remark (STW)  Concurrent Sweep  Features:  Continuous block of memory  No compacting!
  • 23. What‟s the catch?  Fragmentation  Remark phase (STW) “It’s working very well except  Very Large Heaps when it’s not”. –M. Brasier Promotion Failure Concurrent Mode Failure
  • 26. G1 Goals  Low Latency  Better Predictability  Easy to use & tune
  • 27. G1 Heap Layout  Heap divided into +- 2000 regions of equal size  No physical separation between young / old generation  Each region can be either young or old  Object moved between regions during collections  Humongous Region  For large objects  Expensive collecting as of now!
  • 29. G1 Old Generation GC I.  Combination of CMS and Parallel Compacting GC  Concurrent Marking Phase  Remark still STW 1929.299: [GC remark 1929.299: [GC ref-proc, 0.0048180 secs], 0.0258670 secs] [Times: user=0.03 sys=0.00, real=0.02 secs]  Initial Marking part of evacuation pause 62.583: [GC pause (young) (initial-mark), 0.09812400 secs]  Calculating statistics data  Ratio of living objects inside region  Who references our region
  • 30. G1 Old Generation GC II.  Regions with no living objects can be reclaimed immediately (after remark)
  • 31. G1 Old Generation GC III.  Regions with smallest ratio of living objects chosen to evacuate during next GC 53.695: [GC pause (mixed), 0.05568800 secs]
  • 32. G1 Old Generation GC IV.  Concurrent Marking Phase  Calculate liveness ratio  Find best regions to evacuate  Reclaming Regions  After Remark  During evacuation pause
  • 33. Remember Set  Structure to track references from other regions  One per region  Allows to collects objects without tracking whole heap to find references  Maintenance based on write barrier There is no free lunch!
  • 34. Gotcha! (Part I.)  More inter-region references -> Bigger Remember Set  Large Remember Set -> Slow G1  Remember: Large Object -> Humongous Region -> Collecting not optimized as yet
  • 35. G1 Tuning Fundamentals  Main goal of G1 is a low latency -XX:+UseCMSInitiatingOccupancyOnly  If you can tolerate latency use Parallel GC -XX:CMSInitiatingOccupancyFraction=60  Another goal is simplicity (of tuning) -XX:CMSTriggerRatio=60 -XX:CMSWaitDuration=1500 -XX:ConcGCThreads=2  Most important tuning option: -XX:SurvivorRatio=8 -XX:MaxGCPauseMillis=300 -Xmn1g  Influence maximum amount of work per …. collection  No hard promise  Best effort only
  • 36. Other Import Tuning Options I -XX:InitiatingHeapOccupancyPercent=n  When to start a concurrent GC cycle  Percent of an entire heap, not just old geneneration! Too Low -> Unnecessary GC overhead Too High -> “Space Overflow” -> Full GC
  • 37. Other Import Tuning Options II -XX:G1OldCSetRegionLiveThresholdPercent=n  Threshold for region to be included in a Collection Set  To High -> More aggressive collecting  More live objects to copy  To Low -> Wasting some heap
  • 38. Other Import Tuning Options III -XX:G1MixedGCCountTarget=n  How many Mixed GC / Concurrent Cycle  To High -> Unnecessary overhead  To Low -> Longer pauses
  • 39. Considerations Before Tuning  Some options cause your PauseTimeTarget to be ignored! -Xmn  Fixed young generation size
  • 40. Logging the GC Activity  Verbose GC is your friend! -XX:+PrintGC -XX:+PrintGCDetails - XX:+PrintGCTimeStamps  Always use it! Even in production.  Very low overhead. There is no excuse!  Will help you analyze help your GC is performing
  • 41. G1 GC Log 1.297: [GC pause (young), 0.02828800 secs] [Parallel Time: 24.2 ms] [GC Worker Start (ms): 1296.7 1302.7 Avg: 1299.7, Min: 1296.7, Max: 1302.7, Diff: 6.0] [Ext Root Scanning (ms): 16.5 2.9 Avg: 9.7, Min: 2.9, Max: 16.5, Diff: 13.6] [Update RS (ms): 0.0 0.0 Avg: 0.0, Min: 0.0, Max: 0.0, Diff: 0.0] [Processed Buffers : 0 9 Sum: 9, Avg: 4, Min: 0, Max: 9, Diff: 9] […]
  • 42. G1 GC Log 1.297: [GC pause (young), 0.02828800 secs]  Young GC  Started 1.297s from the start of JVM  Total elapsed time was 0.02828800s [Parallel Time: 24.2 ms]  Total elapsed time spent by parallel GC thread
  • 43. G1 GC Log [GC Worker Start (ms): 1296.7 1302.7 Avg: 1299.7, Min: 1296.7, Max: 1302.7, Diff: 6.0]  Two threads and starting times [Ext Root Scanning (ms): 16.5 2.9 Avg: 9.7, Min: 2.9, Max: 16.5, Diff: 13.6]  Time spent by each thread by scanning the roots
  • 44. G1 GC Log [Update RS (ms): 0.0 0.0 Avg: 0.0, Min: 0.0, Max: 0.0, Diff: 0.0] [Processed Buffers : 0 9 Sum: 9, Avg: 4, Min: 0, Max: 9, Diff: 9]  Time spent by updating Remember Sets regions  Update Buffers is a structure tracking changes in references [Scan RS (ms): 0.0 0.1 Avg: 0.0, Min: 0.0, Max: 0.1, Diff: 0.1].  Time spent by scanning areas from Remember Set
  • 45. G1 GC Log [Object Copy (ms): 7.6 15.1 Avg: 11.3, Min: 7.6, Max: 15.1, Diff: 7.5]  Time spent by copying objects to other regions  Usually significant portion of a total time [Termination (ms): 0.0 0.0 Avg: 0.0, Min: 0.0, Max: 0.0, Diff: 0.0] [Termination Attempts : 1 1 Sum: 2, Avg: 1, Min: 1, Max: 1, Diff: 0]  Time spent by offering to terminate  Threads are stealing work from the others
  • 46. G1 Logging Options I  -XX:+PrintAdaptiveSizePolicy 53.628: [GC pause (mixed) 53.628: [G1Ergonomics (CSet Construction) start choosing CSet, predicted base time: 54.79 ms, remaining time: 145.21 ms, target pause time: 200.00 ms] 53.628: [G1Ergonomics (CSet Construction) add young regions to CSet, eden: 51 regions, survivors: 2 regions, predicted young region time: 9.75 ms] 53.628: [G1Ergonomics (CSet Construction) finish adding old regions to CSet, reason: old CSet region num reached max, old: 27 regions, max: 27 regions] 53.628: [G1Ergonomics (CSet Construction) finish choosing CSet, eden: 51 regions, survivors: 2 regions, old: 27 regions, predicted pause time: 131.56 ms, target pause time: 200.00 ms] 53.700: [G1Ergonomics (Concurrent Cycles) do not request concurrent cycle initiation, reason: still doing mixed collections, occupancy: 127926272 bytes, allocation request: 0 bytes, threshold: 125986365 bytes (45.00 %), source: end of GC]
  • 47. G1 Evacuation Failure  Evacuation Failure Happens when we do not have empty regions  Heap is already at maximum size  Very expensive operation!  Search for “to-space overflow”  Remedy:  Increase to heap size  -XX:InitiatingHeapOccupancyPercent=  More marking threads
  • 48. Is G1 Production Ready?  It depends!  Well, some people use it in production  The days of G1 crashing JVM are hopefully over  Still quite significant changes  Bugs are still being found  Bug 7181612 : G1: Premature Evacuation (7143858) strikes again  Bug 7143858 : G1: Back to back young GCs with the second GC having a minimally sized eden  You should probably evaluate/use G1 when everything else is failing  And you have no alternative!
  • 49. GC Decisioning: Rules of Thumb I  Do I really need a Low Latency  No? Use Parallel GC  Do I really need a Big Heap?  Yes? Think again!  Do I really need a Big Heap?  No? Use small heap & Parallel GC  Yes? Try CMS 1st
  • 50. GC Decisioning: Rules of Thumb II  Is CMS performing well?  Yes? Done!  No? Tune it!  Is tuned CMS performing well?  Yes? Done!  No? Tune it more!  Is CMS performing well now?  Yes? Done!  No? Do you really need such big heap?
  • 51. GC Decisioning: Rules of Thumb III  Yes, I really need a Big Heap a Low Pauses!  This is the moment where you should start considering to use G1!  In Nutshell:  For now treat G1 as a last resort  When other GCs are failing  Be aware of gotchas: Very Large Objects Large Remember Sets Footprint?  Test carefully before using in a production!
  • 52. G1 – Recent Commits date: Tue Oct 30 11:45:51 2012 -0700 summary: 7200261: G1: Liveness counting inconsistencies during marking verification date: Thu Sep 20 09:52:56 2012 -0700 summary: 7190666: G1: assert(_unused == 0) failed: Inconsistency in PLAB stats date: Tue Aug 21 14:10:39 2012 -0700 summary: 7185699: G1: Prediction model discrepancies
  • 53. G1 – Recent Commits – Conclusion?  Do not use anything before 7u4  Use 7u9 or later  The latest version in the best case  Do not use G1 from Java 6
  • 54. What Are The Alternatives?  Workaround / Hacks:  Off Heap Allocations  DirectBuffers  JNI  Object Pooling
  • 55. Further Resources  JavaOne 2012 G1 Talk, Charlie Hunt, Monica Beckwith  hotstop-gc-use mailinglist  http://www.quora.com/What-is-the-status-of-the-implementation-of-the-G1-garbage- collector-for-the-JVM#  ….
  • 56. Q&A

Notas del editor

  1. not only in JVM. for example .NET or Python
  2. difference between conccurent vs. parallel
  3. ability to run at the same time as my application
  4. parallelism = more threads to do the GC work
  5. compactation = ability to create consolidate blocks of free space
  6. first setdifferent implementations for young and old generations, but same in principles
  7. -initial mark = finding root objects – references from thread stack + references from young space-no compactation
  8. too good to be true!
  9. -size of region between 1MB – 32MB, always power of 2-what is large object? over 50% of size of the region
  10. -stop the world-parallel-calculation of new young gen size
  11. -statistics are used to estimate an effort to evacuate the region-remark use different algorithm
  12. -no separate old GC – together with young gc-only a subset of regions
  13. different algorithm for marking – snapshot at the beginning
  14. -Tuning is Easy - in contrast of CMS-
  15. XX:InitiatingHeapOccupancyPercent=45
  16. XX:G1OldCSetRegionLiveThresholdPercent=90
  17. XX:G1MixedGCCountTarget=4
  18. -is GC bottleneck?-what phases of GC?-what to tune?
  19. solve only some problems-bigmemory / coherence-tomcat
  20. solve only some problems-bigmemory / coherence-tomcat