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
2
votes
1 answer

java garbage collection about ZGC and G1

What is the difference between ZGC's relocation set and G1' s collection set in Java?I and learning JAVA's garbage collection and feel uncertain about this.
coffee
  • 23
  • 2
2
votes
1 answer

When will G1 GC allocate objects in old generation directly

In my gc log, there are many objects are allocated to old generations (ALLOC(Old) logs), current threshold is 15, my objects age is only 1, i.e, these objects will not be promoted to old generations, i guess is there any condition when objects will…
Roy Zhang
  • 41
  • 2
2
votes
1 answer

When will G1 GC trigger initial-mark besides IHOP

I set -XX:InitiatingHeapOccupancyPercent=70 in JDK8 (no adaptive IHOP feature), but I found there are two initial-mark phase at the beginning of JVM start when HeapOccupancyPercent is far less than 70%, is there any other factor which will trigger…
Roy Zhang
  • 41
  • 2
2
votes
1 answer

Questions about g1 gc on pre write barrier

I was told when a reference has been changed in jvm , using g1 gc will insert pre write barrier to change the remember set accordingly ,but where is the code ? i check the byte code implementation such as putstatic ,but i can't find where the pre…
zhihaofeng
  • 35
  • 3
2
votes
0 answers

Why does Full GC happen before the memory is exhausted?

When using the G1GC in JVM 8, Full GC (Allocation Failure) happens before memory is Exhausted. And it appear every 30 minutes, every time it stop the application 6-10 second, about 300-500 requests were timeout failure, that's badly for me. I don't…
a.fan
  • 31
  • 5
2
votes
2 answers

Major GC not running in G1

After analyzing the performance issues of an application, following points were noted. JVM uses G1 GC During peak hours JVM suspension goes beyond 20% For Eden Space - GC count per minute is 20 and GC time per minute is 10seconds (not…
Winster
  • 943
  • 10
  • 28
2
votes
4 answers

Should I use SerialGC or G1GC ona single CPU system?

I have a container that is limited to 1 CPU, the default case for java 11+ (and probably older also) in such case it to user SerialGC. Should I force a threaded GC (like G1GC) or just leave it at SerialGC? Which one will perform better on a single…
Krzysztof Krasoń
  • 26,515
  • 16
  • 89
  • 115
2
votes
2 answers

Can the address of a variable change due to G1 garbage collection?

I was reading the official JDK 12 specs and had to verify something, which led me to an article that said: "G1 collects regions with the least amount of live data (Garbage First!) and compacts/evacuates live data into new regions. Secondly, it uses…
Calicoder
  • 1,322
  • 1
  • 19
  • 37
2
votes
1 answer

Low throughput of service due to frequent Garbage Collection

I have a service running on a system with 16GB RAM with following configurations :…
AkaSh
  • 486
  • 4
  • 16
2
votes
1 answer

Performance Metrics to choose garbage collector

What should I measure while choosing the garbage collector? In my case, I am trying to compare the performance of throughput collector over G1GC, not quite sure what should I look for before making my final decision. I know looking at how much time…
Sagar
  • 5,315
  • 6
  • 37
  • 66
2
votes
1 answer

Error when setting G1 GC on Elastic Bean Stalk

I'am trying to set G1 GC on elastic bean stalk using JVM options by UI using the following argument: –XX:+UseG1GC. But when i try to restart the instance, the following error is thrown: Error: Could not find or load main class ?XX:+UseG1GC Why this…
Ramon Lacava
  • 55
  • 2
  • 8
2
votes
2 answers

SerialOld GC with G1GC

I am using G1GC and in the java mission control I found the following: Why it shows SerialOld? In the config it shows the following:
Bruno Manzo
  • 353
  • 3
  • 15
2
votes
1 answer

Why are G1 garbage collector Unloading times increasing over time?

I'm experiencing a strange behavior when using the G1 garbage collector when running Glassfish under Solaris (SPARC) with the JDK 8u172, the Unloading time of the Remark phase is very long and increasing over time. Here is an extract of the logs…
Florent Bayle
  • 11,520
  • 4
  • 34
  • 47
2
votes
0 answers

how many and how to divided in different parts of regions(Eden,Surviver,old Gen.) in G1 GC

What is the internal calculation of how many parts makes of Eden,survivor and old Gen in G1 GC. And how to perform different type of GC(Minor,Major,Full) on G1 GC. please anyone can describe in detail.
Hitesh
  • 271
  • 2
  • 5
  • 18
2
votes
1 answer

How do I know when to tuning Heap size when using G1 GC?

In Oracle's G1 GC document, G1 GC does not recommend tuning JVM options because throughput and latency are…