Questions tagged [g1gc]

G1 or Garbage First is a generational partially collecting concurrent and parallel garbage collection algorithm. It is targeted for multi-processor machines with large memories and can meet soft realtime requirements with garbage collection (GC) pause time goals. An implementation of the G1 currently ships with the new Java 7 VMS - officially supported from JDK7 update 4.

G1 or "Garbage First" is a generational partially collecting concurrent and parallel garbage collection algorithm. It is targeted for multi-processor machines with large memories and can meet soft realtime requirements with garbage collection (GC) pause time goals.

An implementation of the G1 currently ships with the Java Hotspot 7 VM - officially supported from JDK7 update 4.

Resources

314 questions
5
votes
2 answers

If Java's generational garbage collectors traverse the graph of live objects, how do they know which objects to call finalize() on?

My understanding is that GCs like ParallelGC and G1 are "generational" collectors. Garbage Collection almost happens as a byproduct, since you move all live objects to a new heap region and anything left in the old region will simply be overwritten.…
user7382368
  • 293
  • 1
  • 9
5
votes
2 answers

java G1 gc takes too much of memory

For example, I set -Xmx as 40G. I expect my java processor won't use exceed 40G. My program is working fine with cms-gc. But when I change to G1 gc with same memory(even 15% more memory). It always killed by oom killer. I found some article like…
yunfan
  • 760
  • 1
  • 11
  • 24
5
votes
2 answers

G1 GC: What is SATB buffer?

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.
Eric
  • 22,183
  • 20
  • 145
  • 196
5
votes
1 answer

Hotspot JVM - G1GC Heap resizing issue

I was recently testing a presentation app with a relatively high concurrent load. The application is a java application and is running on Hotspot JVM (1.8.0_111). I could get a maximum throughput of around 400 TPS with a 4G heap and parallel…
5
votes
1 answer

Spark: shuffle operation leading to long GC pause

I'm running Spark 2 and am trying to shuffle around 5 terabytes of json. I'm running into very long garbage collection pauses during shuffling of a Dataset: val operations = spark.read.json(inPath).as[MyClass] operations.repartition(partitions,…
Luke
  • 6,699
  • 13
  • 50
  • 88
5
votes
2 answers

JVM GC working very strange

After trying numerous different JVM GC setting and doing a lot of testing where I was having problems with long major GC pauses I'm now testing with G1GC JVM GC. Beside this I'm also collecting data with performance monitor and only applications…
user4341206
  • 647
  • 1
  • 7
  • 26
5
votes
0 answers

G1 garbage collector tuning

I have an application running on Java 7 update 45 on Hotspot JVM. I am trying to tweak the parameters to work for a low latency application and below are the JVM parameters i set for this run. The timings in the individual steps in GC log (approx…
4
votes
1 answer

Why Old generation objects clearing up by minor GC

I am using Java 11 and using G1GC. The application that I am working on is a big data application, and the weird thing that I am noticing is that I am monitoring the application for 24 hours, and there is no major GC. But the size of Old gen is…
4
votes
1 answer

What is remembered set in G1 algorithms used for?

I just read some blogs about G1 algorithm. The usage of remembered-set is confused to me. Here is what I think: Since we can use DFS to walk through every reference from GC-Roots, why do we need remembered-set? Cause all the blogs to say the reason…
ratsafalig
  • 442
  • 5
  • 21
4
votes
2 answers

Does Java G1 garbage collector respect MaxHeapFreeRatio parameter?

Does the Java G1 garbage collector (as implemented in Open JDK) respect the -XX:MaxHeapFreeRatio=n JVM parameter? Does it respect it in Java 8? I found JEP 346: Promptly Return Unused Committed Memory from G1 delivered in Java 12, but it's not…
Piotr Findeisen
  • 19,480
  • 2
  • 52
  • 82
4
votes
2 answers

G1GC compaction within regions

As I understand, G1 GC performs evacuation to reclaim heap from both young and old regions, in doing so it indirectly compacts heap (copying live objects from a to-be-collected region to an empty region). Could G1 GC get into a case where there are…
Abidi
  • 7,846
  • 14
  • 43
  • 65
4
votes
1 answer

Java verbose GC log configuration - file not being created

I've tried to configure in both eclipse and intelliJ arguments with garbage collection logger for simple test program. Tried different kind of configurations and the log file has not been created. -XX:+PrintGCDetails -XX:+PrintGCDateStamps…
LamaTo
  • 540
  • 1
  • 8
  • 21
4
votes
1 answer

Understanding GC G1 - Concurrent Marking phase

I'm trying to understand a few things about GC G1 and hope you can guys help me. What exactly is the role of whole Concurrent Marking phase in GC G1? I mean all parts (initial marking, root region scan, ..., cleanup). As far as I understand its…
BartekN
  • 211
  • 3
  • 9
4
votes
1 answer

Tuning G1GC params for aggressive garbage collection?

My JVM is basically a spark executor which is running tasks one after another. A task is memory hungry and requires significant memory during its lifecycle. JConsole and JVisualVM report side by side The above JVM is running on G1GC with default…
akshay
  • 49
  • 5
4
votes
3 answers

G1GC GC logs what do they mean?

I do not understand what exactly the G1GC GC logs mean(when adding PrintGCDetails and PrintGCTimeStamps). Can someone shed light on the syntax? [ GC pause (young), 0.03067078 secs] [SATB Drain Time: 0.2 ms] [Parallel Time: 22.6 ms] …
lifey
  • 87
  • 1
  • 9