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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
18 views

Elasticsearch search response pick(latency) occurs when _refresh with G1GC

Our elasticsearch cluster has 3 master nodes and 12 data nodes installed on 2 IDCs. In front of elasticsearch, there is search api server that multisearches three indexes. It shows an average response ...
0 votes
0 answers
17 views

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 ...
  • 745
-2 votes
1 answer
26 views

Application freezing on g1 old run [closed]

we currently run DonutSMP.net, a minecraft server that handles concurrently more than 4000 players online every day and it runs a survival gamemode, chunk-intensive, currently we have been ...
2 votes
2 answers
73 views

JVM not using all available heap space

I'm trying to understand G1 garbage collection logs. Most important details you may find in the top of the log file. Heap max capacity is 594M, but the latest garbage collection cycle had used only ...
  • 525
0 votes
0 answers
33 views

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 ...
0 votes
0 answers
30 views

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 ...
  • 7,752
0 votes
1 answer
80 views

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 ...
0 votes
0 answers
52 views

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 ...
  • 22.7k
0 votes
0 answers
32 views

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 ...
0 votes
0 answers
50 views

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 ...
0 votes
0 answers
8 views

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 ...
0 votes
0 answers
71 views

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, ...
2 votes
1 answer
484 views

java JDK 11 G1 garbage collector collections taking longer and longer

I have spring boot java-service (JDK 11) running on a linux-platform in which under heavy load the time used for garbage collection (collector G1) keeps getting longer and longer. When the service is ...
8 votes
1 answer
158 views

Short-lived java applications: How to tune G1 to kick in later?

I've got short-living applications which usually (but not always) do not need any GC (fits in heap, epsilon GC proves this by not causing an OOM). Interestingly, G1 still kicks in very early even ...
  • 15.5k
0 votes
0 answers
36 views

can someone analysis the policy of g1 adjust age threshold?

1.jdk openjdk11 2.jvm params JVM_GC="-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:MaxGCPauseMillis=40 -XX:-UseBiasedLocking -XX:+AlwaysPreTouch -XX:+HeapDumpOnOutOfMemoryError -verbose:gc&...
2 votes
1 answer
829 views

Java 17 process running out of memory on Kubernetes when memory potentially available

The goal is to understand what should be tuned in order for the Java process to stop restarting itself. We have a Java Springboot backend application with Hazelcast running that restarts instead of ...
1 vote
2 answers
403 views

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 ...
0 votes
1 answer
1k views

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 ...
  • 3,890
0 votes
0 answers
248 views

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&...
  • 1,724
0 votes
0 answers
116 views

Why Eden size is not increasing even when it has enough committed heap space

I understand that G1GC adjust size of young generation (Eden + Survivors) to meet the target pause time which is 200ms (default value) in this case. I noticed that Eden size was reduced even when it ...
  • 943
1 vote
1 answer
2k views

When not to use G1GC garbage collector?

I looked into differences between various garbage collectors available for JVM. Here is the answer explaining the main differences between them : https://stackoverflow.com/a/54619838/5345646 Here it's ...
  • 3,890
-4 votes
1 answer
118 views

Is G1GC stable for Large spark application

Our data pipeline is currently running on Spark 2.4 and java version 1.8, it takes about 10 hours to performing all the ETL steps. Currently we noticed that driver memory heap is elevated and causing ...
  • 13
0 votes
0 answers
101 views

Java JVM G1GC Young Generation Eden Size Decrease and Predicted Pause Time Increase without Obvious Reason

My MicroService JVM openjdk version "1.8.0_292" encounter Eden size decrease suddenly from time to time like below and accordingly the predicted young region time increase significantly ...
1 vote
1 answer
196 views

G1 does not allow to allocate large object while Parallel does

openjdk 11.0.14.1 2022-02-08 Consider the following simple Java program. public static void main( String[] args ){ int i[] = new int[Integer.MAX_VALUE / 2]; } Here int is 4 byte in size so ...
  • 8,253
0 votes
0 answers
312 views

G1GC Full GC with Metadata GC though enough Metaspace exists?

We are using Java 11 and noticed weird Metadata GC-related Full GC every couple of hours though GC logs suggest sufficient metaspace exists. Startup parameters java -XX:+UseCompressedClassPointers -...
0 votes
1 answer
220 views

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 ...
  • 1,424
1 vote
0 answers
570 views

ZGC out of memory error when moving from G1GC

I have an application in Java 17 configured like so: -Xms4096m -Xmx4096m -XX:+UseG1GC -XX:MaxMetaspaceSize=1024m It's a rather large web service that is pretty memory intensive over the years that's ...
  • 476
0 votes
0 answers
2k views

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 ...
  • 33
0 votes
1 answer
65 views

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 ...
0 votes
1 answer
93 views

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 ~...
1 vote
0 answers
312 views

Eden space suddenly shrinks and Old Gen grow very high

I have the same issue described in Why is the JVM suddenly shrinking eden space and enlarging old space? (causing performance issues) with the Tomcat 8.5.73 image running the following openJDK version ...
2 votes
2 answers
1k views

G1 GC allocated memory is more than heap size

I change GC for application server. Now I use G1 GC. I have 30 GB RAM. For initial testing I set only Xms and Xmx values to be the same 23040 mb. Settings I use: -Xms23040m -Xmx23040m -XX:+UseG1GC ...
  • 5,315
0 votes
1 answer
292 views

jvm G1 ,The memory is full, full gc and fail has many many times , then throw OOM , 5min or more, cost a long time ,why?

in my demo project, 69.741: [Full GC (Allocation Failure) 1023M->1023M(1024M), 1.1631632 secs] about 30+ times, then throw OOM, about 1min. the same jvm params, the same code. in my online ...
0 votes
1 answer
793 views

Consequences of setting G1HeapWastePercent to zero in G1

Good day , I am using G1 in production(Hotspot JDK 11) and trying to understand how it works. As far as I understand , Old GC in G1 only cleans those regions which are full of garbage, otherwise ...
0 votes
0 answers
142 views

G1 problems with large heap

I've been pulled in to try to analyse gc problems for one of our installations. We're getting OOME somewhat randomly when old gen has grown a bit large. The total allocated heap is **220 GB**, ...
  • 2,003
2 votes
2 answers
130 views

Do all Apache Cassandra nodes need to use the same Garbage Collector?

I have recently upgraded our Cassandra cluster from 3.11 to 4.0 with the long term goal to also upgrade the Java version. I did not want to do both of these things at once for obvious reasons, however ...
  • 609
0 votes
0 answers
153 views

g1 gc 'Other' take a long time

G1 gc 'Other' takes a long time. What is the most possible cause and how to solve it? gc log jvm params: -XX:+UseG1GC -XX:MaxGCPauseMillis=10 -Xmx2048m -Xms2048m -Xss512k -XX:NewRatio=2 -XX:...
2 votes
0 answers
58 views

Memory issues when using G1GC

I am a beginner Java developer. My application is using Java 8. I know that in Java 8, Parallel GC is the default. When no options are given, the memory is 500MB. However, giving the G1 GC option ...
2 votes
0 answers
150 views

Why does Kafka have a lot of Sensor objects in Old gen heap?

I have a Kafka broker (2.7.1) running on Java 11. I noticed that the broker is slow because of the G1 old generation collections. Taking a heap dump reveled that about 30% of heap is used by a ...
  • 4,039
0 votes
1 answer
87 views

What does GarbageCollectorMXBean#getCollectionTime mean in G1GC

What does GarbageCollectorMXBean#getCollectionTime mean in G1GC. Is it the sum of pause time(time spent by STW phase) and concurrent phase or something else?
2 votes
2 answers
981 views

Garbage Collector does not release memory on his own

Why does my garbage collector(G1 GC) do not release memory altough he could? The Used Heap is going up over time, the step fall at the end is because I forced the GC to release memory through jcmd <...
  • 2,015
0 votes
1 answer
1k views

Full GC is not kicking in for G1 GC in Java 11. What could be the reasons?

The JVM arguments are as follows: -Xms20g -Xmx20g -XX:MaxGCPauseMillis=10000 -XX:G1ReservePercent=30 -Duser.timezone=UTC The only thing in logs are Pause Young (Normal) (G1 Evacuation Pause) Pause ...
0 votes
1 answer
247 views

long Young garbage collection pauses due to JSON loading in Java 11

In my application I have implemented a background task which reads a JSON file to memory and parses it into Java objects of relevant (specified in JSON) classes. I use Jackson to parse JSON. The JSON ...
  • 639
2 votes
1 answer
590 views

Garbage Collection tuning in Java8 using G1GC

We are trying to improve our app performance and are doing a performance testing. We have a Linux VM with 4 cores and 16 GB memory. The application has more then 100 users and are complaining of ...
  • 21
3 votes
1 answer
1k views

Sudden increase in G1 old generation committed memory and decrease in Eden size

For some reason, G1 is deciding to increase the committed old generation memory (although the used memory does not increase) and decrease the Eden generation committed memory (consequently the usable ...
0 votes
1 answer
442 views

Why XX:G1HeapRegionSize in G1GC must be power of 2?

Oracle documentation https://docs.oracle.com/javase/9/gctuning/garbage-first-garbage-collector.htm#JSGCT-GUID-98E80C82-24D8-41D4-BC39-B2583F04F1FF says that XX:G1HeapRegionSize must be power of 2 but ...
5 votes
1 answer
329 views

jdk11 g1gc spend a lot of time on prepare TLABs

gc.log shows that Prepare TLABs phase spends for about 57 second which is unaccpetable. Furthermore, this situation has only happened once in five days. I just want to figure out what happened ...
  • 61
1 vote
0 answers
44 views

CircuitBreakException <transport_request> Elasticsearch

My setup is 1 master node and 18 data node.My master node also data node.My tps events/sec 70-100 and my jvm options like this. Elasticsearch version 7.5.0 open-jdk 13 Active primary shards : 5404 ...
0 votes
0 answers
401 views

Why is the JVM suddenly shrinking eden space and enlarging old space? (causing performance issues)

We are running 3 replicas of a java/spring boot microservice in a docker/k8s environment. After days of running without any issues one of the 3 becomes very slow due to extreme cpu usage and very high ...
  • 160
2 votes
1 answer
88 views

Java GC1 doesn't throw OutOfMemory but keeps struggling

I want my app to fails fast in case of insufficient memory, so it can be adjusted and the process restarted. I am running the service with -XX:ParallelGCThreads=8 -XX:GCTimeRatio=19 -XX:...

1
2 3 4 5
7