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
0
votes
0 answers

Why does Mission Control show a different GC time to the GC log for a given GC ID?

Mission Control shows: GC ID: 301 GC Duration: 2.595 s For id 301, the log shows: [2023-03-02T14:55:45.298+0000][info ][gc,cpu ] GC(301) User=24.55s Sys=0.85s Real=0.64s I have 2.59s (which would be 2.595 truncated and not rounded to 2.60)…
doc
  • 765
  • 1
  • 6
  • 24
0
votes
0 answers

Different behaviour in G1 GC with the same app in two different servers

We have a microservices environment with two servers and 50 java(11) apps managed by tomcat. Each app have small heap (no more than 2 GB) and starts with 500 MB (-Xms). Sometimes, after reboot the server, we observe that G1 GC behaviour change, and…
netmon80
  • 11
  • 3
0
votes
0 answers

G1GC: Continuous G1 evacuation phase

I am using 16gb Heap along with G1GC. For some of batches I am seeing continuous GC pause (G1 Evacuation Pause) multiple times within a second which is drastically slowing down the batch. I have noticed that despite evacuation pause memory doesn't…
Lokesh
  • 7,810
  • 6
  • 48
  • 78
0
votes
1 answer

How to make G1GC garbage collector run more frequently?

I have a Openjdk 11.0.17 + Spring Boot application and this is my GC Configuration --XX:+UseG1GC -XX:MaxGCPauseMillis=1000 -Xms512m -Xmx8400m. When the application is running and the heap usage increases as per the incoming web traffic. But I am…
0
votes
0 answers

WSO2 API Manager cluster OutOfMemoryError java heap space with G1 GC and Old Gen continuosly growing

I've set up a production WSO2 API Manager 4.1.0 cluster with two nodes. This cluster is not live yet so it's sitting idle with minimum work to do. Its memory config is quite generous, especially for the current workload: -Xmx3072m -Xms3072m The…
codependent
  • 23,193
  • 31
  • 166
  • 308
0
votes
0 answers

G1GC and Permgen

I'm having doubts regarding which metrics I should follow to allocate memory for the permgen. I'm having crashing problems and that permgen is full, my server has 32gb of memory for the heap and 512m for permgen, would you have any metrics or…
0
votes
0 answers

Performance Impacted - Eden space starvation when old gen grows

We are using open-jdk 11 and 2GB is used as the max heap size. The application works smoother till it has enough Eden space and performance starts to degrade when the Eden space shrinks to less than 300MB. Whenever the oldgen reaches 1GB (50%), the…
user1433374
  • 185
  • 1
  • 9
0
votes
0 answers

STW time is longer than times in SafepointStatistics

Background In our Presto service, we found that real time was longer than the sum of user and sys times. For details, refer to the previous question:which is G1 young STW time? The Presto service is run on the k8s pod, we don't find the root cause.…
sunrise
  • 1
  • 2
0
votes
0 answers

which is G1 young STW time?

In our application, we use G1 gc. We have received the following log: 2022-11-04T16:51:02.322+0800: 4923545.042: [GC pause (G1 Evacuation Pause) (young), 0.1095177 secs] [Parallel Time: 106.2 ms, GC Workers: 5] [GC Worker Start (ms): Min:…
sunrise
  • 1
  • 2
0
votes
1 answer

What is the default value of G1HeapRegionSize?

For the G1GC, I am trying to understand what the default value of G1HeapRegionSize argument is. I see here that: -XX:G1HeapRegionSize=n : Sets the size of a G1 region. The value will be a power of two and can range from 1 MB to 32 MB. The goal is…
Mooncrater
  • 4,146
  • 4
  • 33
  • 62
0
votes
0 answers

G1 Garbage Collector: Why survivor space is -1

I see these metrics: # HELP jvm_memory_max_bytes The maximum amount of memory in bytes that can be used for memory management # TYPE jvm_memory_max_bytes gauge jvm_memory_max_bytes{area="heap",id="G1 Survivor Space",}…
tryingHard
  • 1,794
  • 4
  • 35
  • 74
0
votes
1 answer

G1GC - How to check if the humongous objects is a bottleneck in GC?

My Java application generated the following parts of logs: [2022-04-15T08:30:22.722+0000][debug][gc,humongous ] GC(1574) Live humongous region 926 object size 3914888 start 0x0000000673c00000 with remset 2 code roots 0 is marked 0 reclaim…
Steven Chou
  • 1,504
  • 2
  • 21
  • 43
0
votes
0 answers

Major GC not running in G1 to clear Old Gen Heap

JVM uses G1 GC, Old Gen heap is increasing continuously, I have left my application for 5 days and below is the heap usage - jstat -gcutil 1 S0 S1 E O M CCS YGC YGCT FGC FGCT CGC CGCT GCT 0.00…
Akash
  • 33
  • 1
  • 4
0
votes
1 answer

In what way String Deduplication is different from String interning

As we know In Java String, process of storing and maintaining only one literal of any String is String interning. I felt String Deduplication serves the same purpose when I read it first time. could some one explain Deduplication advantage over…
0
votes
1 answer

How to prioritize Java G1 garbage collection for memory over speed?

I have a Java/Spring data transfer service that reads records in from a .csv file, parses them, collates them in memory, and then loads them into a database. Each run of parses a file that contains ~800k records. The service is deployed to a…
FerdTurgusen
  • 320
  • 5
  • 13