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
2 answers

Why Spark application runs much slower with lower MaxGCPauseMillis?

I am testing Spark-1.5.1 with different G1 configurations and observe that my application takes 2 min to complete with MaxGCPauseMillis = 200 (default) and 4 min with MaxGCPauseMillis = 1. The heap usage depicted below. We can see from the…
user2616566
  • 63
  • 1
  • 3
2
votes
2 answers

Why Garbage-First (G1) targeted for multiprocessor machines with large memories

According to: 9 Garbage-First Garbage Collector and: G1: Java's Garbage First Garbage Collector G1 targeted for multiprocessor machines with large memories. Those 2 papers (and other web papers), does not describe why we need: a. large memories…
user3668129
  • 4,318
  • 6
  • 45
  • 87
2
votes
0 answers

How to interpret the figure produced by "visualgc" for G1 garbage collector?

I am trying to tune G1 GC in my application (using Java 1.8.0_66; Java HotSpot(TM) 64-Bit Server VM), by utilizing the visualgc plugin of jvisualvm (also in version of 1.8.0_66). However, I failed to read any information related to G1 from the…
hengxin
  • 1,867
  • 2
  • 21
  • 42
2
votes
1 answer

No evacuation failures but still FullGC in G1GC

I'm tuning G1GC avoiding to occur FullGC. By following this tips http://www.infoq.com/articles/tuning-tips-G1-GC , I don't see any logs like "to-space exhausted". Java HotSpot(TM) 64-Bit Server VM (24.76-b04) for linux-amd64 JRE (1.7.0_76-b13),…
Chi Shin Hsu
  • 261
  • 1
  • 2
  • 12
2
votes
1 answer

JVM is functioning very differently with same flags

I created test application (with Sheduler inside that runs every 20ms, there are reads/writes to DB) and deployed it on Glassfish server on two different PC. Both have same (copy from one PC to another) Glassfish (both have also latest JAVA version)…
user4341206
  • 647
  • 1
  • 7
  • 26
2
votes
2 answers

JVM ClassUnloadingWithConcurrentMark flag

I have a question about ClassUnloadingWithConcurrentMark flag since I didn't find any useful help anywhere. If we use G1GC is set to true by default (-XX:+ClassUnloadingWithConcurrentMark). If I use -XX:-ClassUnloadingWithConcurrentMark flag to turn…
user4341206
  • 647
  • 1
  • 7
  • 26
2
votes
1 answer

What are the main differences between G1GC and SGen GC

What are the main differences between Java7's G1 garbage collector and mono's SGen garbage collector? I know both of them are of generational GC, but how are they different in performance wise and architecture wise?
Anindya Chatterjee
  • 5,824
  • 13
  • 58
  • 82
2
votes
2 answers

G1 Garbage Collector spending a majority of time in Ref Proc

I'm new to the G1 Garbage collection, but I have a heap with a Max of 26G, initial size 10G, and it's current size is 26G with 15G used. I have GC logging turned on with the following arguments: -XX:+PrintGC -XX:+PrintGCDetails…
Nicholas
  • 7,403
  • 10
  • 48
  • 76
1
vote
3 answers

Java SoftReference, panicing GC and GC behavior

I want to write a cache using SoftReferences using as much memory as possible, as long as it doesn't get too inefficient. Trying to estimate the used size by calculating object sizes or by getting some used memory approximation of the JVM are dead…
Franz Kafka
  • 10,623
  • 20
  • 93
  • 149
1
vote
1 answer

what happens when javax.net.ssl.sessionCacheSize becomes full?

I am trying to analyse one of our applications running in production, and currently the value of javax.net.ssl.sessionCacheSize is set to 10000. we are using java 17 in production, and by default in Java 17, value of javax.net.ssl.sessionCacheSize…
Ajay Kumar
  • 586
  • 5
  • 21
1
vote
1 answer

Cassandra Cluster presenting "G1 Old Generation GC In" even removing nodes

This is a situation for the company that I work for, that's causing to loose my sleep, since I'm in front of the wall and finding no options. I have a production cluster of 51 cassandra 3.11.9 nodes, that works with a large load (from 600 to 800 GB…
1
vote
0 answers

What should be the ideal value for -Djavax.net.ssl.sessionCacheSize for Java Services

I was wondering what should be the ideal value for -Djavax.net.ssl.sessionCacheSize for java service which is about to goto production. I know we can fine tune it later but what should be initial value. I did some research and figured out that it is…
Ajay Kumar
  • 586
  • 5
  • 21
1
vote
0 answers

Memory Usage is constantly increasing in Kotlin Service

We have a service in production written in Kotlin where we are using G1GC for garbage collection. And for some reason we have way too many GC events (43k; also attached the data below) since the eden space is filling very frequently. bash-4.2$ java…
Ajay Kumar
  • 586
  • 5
  • 21
1
vote
0 answers

java 17 on kubernetes committed heap not reducing in

I am running application in java17 on kubernetes with rollingUpdate deployment. The JVM properties are as follows: - name: InitialRAMPercentage value: '-XX:InitialRAMPercentage=40' - name: MaxRAMPercentage value:…
Scientist
  • 1,458
  • 2
  • 15
  • 31
1
vote
2 answers

Does G1 GC in Young generation halts the application

We use corretto java and using G1 gc. As far as I know, the gc algorithms do halts the application while doing full gc for sometime not while young generation as it happens more frequently. But some of articles mentioned that G1 gc halts the…
Selvakumar Ponnusamy
  • 5,363
  • 7
  • 40
  • 78