Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

G1 GC: What is SATB buffer?

Tags:

java

jvm

g1gc

In Java 8 G1 GC, what is SATB buffer?

I saw this term in: http://www.oracle.com/technetwork/articles/java/g1gc-1984535.html

After searching via Google, didn't found it's definition.

Any help? Thanks.

like image 275
user218867 Avatar asked Feb 13 '17 10:02

user218867


People also ask

What is G1 evacuation pause?

G1GC will pause your app while it frees unused memory objects and compacts memory regions to reduce wasted space. These GC pauses can introduce visible delays while your app is running. You can inspect the GC logs to see how long your app was delayed for by using the -Xlog:safepoint command-line option.

What is :+ UseG1GC?

-XX:+UseG1GC - Tells the JVM to use the G1 Garbage collector. -XX:MaxGCPauseMillis=200 - Sets a target for the maximum GC pause time. This is a soft goal, and the JVM will make its best effort to achieve it. Therefore, the pause time goal will sometimes not be met. The default value is 200 milliseconds.

What is G1 old gen heap?

G1 GC is a generational garbage collector, that is, the heap is split into generations with the premise, most objects die young. It is more efficient to deal with (clean) objects in the young generation rather than move to the old generation and clean it up there. This is no different than Serial, Parallel and CMS GC.

Does G1GC stop the world?

G1GC (Garbage First Garbage Collector) is the low latency garbage collection algorithm included in recent versions of both OpenJDK and Oracle Java. Like other Java GC algorithms, to reclaim heap space G1GC must halt all application threads, a process referred to as stopping-the-world (STW) or pausing (a GC pause).

What is the purpose of buffers in G1 GC?

1 The document you are referring to says: G1 GC uses the Snapshot-At-The-Beginning (SATB) algorithm, which takes a snapshot of the set of live objects in the heap at the start of a marking cycle. So the logical conclusion would be: these buffers are used by that algorithm in order to store that snapshot.

How does G1 GC work?

The G1 GC uses concurrent and parallel phases to achieve its target pause time and to maintain good throughput. When G1 GC determines that a garbage collection is necessary, it collects the regions with the least live data first (garbage first).

How does G1 GC reduce heap fragmentation?

The G1 GC reduces heap fragmentation by incremental parallel copying of live objects from one or more sets of regions (called Collection Set (CSet)) into different new region (s) to achieve compaction.

What is a snapshot at the beginning of GC?

G1 GC uses the Snapshot-At-The-Beginning (SATB) algorithm, which takes a snapshot of the set of live objects in the heap at the start of a marking cycle. The set of live objects is composed of the live objects in the snapshot, and the objects allocated since the start of the marking cycle.


1 Answers

I assume it's a buffer for the

G1 GC uses the Snapshot-At-The-Beginning (SATB) algorithm, which takes a snapshot of the set of live objects in the heap at the start of a marking cycle.

http://xiao-feng.blogspot.co.uk/2007/04/incremental-update-tracing-vs-snapshot.html

https://rkennke.wordpress.com/2013/06/19/shenandoah-gc-concurrent-parallel-marking/

like image 85
Peter Lawrey Avatar answered Sep 28 '22 07:09

Peter Lawrey