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

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 project(has zk, nacos,es,rabbit,actuator...) about 5min+…
perfect
  • 1
  • 1
0
votes
1 answer

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 regions are put into some queue. Later on Mixed GC is…
Almas Abdrazak
  • 3,209
  • 5
  • 36
  • 80
0
votes
0 answers

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**, running **JDK 8 (1.8.0_292-b10)**. Xms is set equal to…
Erik
  • 2,013
  • 11
  • 17
0
votes
0 answers

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:MetaspaceSize=256m -XX:MaxMetaspaceSize=512m…
0
votes
1 answer

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?
0
votes
1 answer

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 Remark Pause Young (Prepare Mixed) (G1 Evacuation…
0
votes
1 answer

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 file is about 6MB in size. My JSON files look…
Leukonoe
  • 649
  • 2
  • 10
  • 29
0
votes
1 answer

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 there is no restriction in setting any value…
0
votes
0 answers

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 gc pauses. One specific odd metrics that caught…
Paul7979
  • 210
  • 1
  • 3
  • 10
0
votes
1 answer

What's the difference between 'Survival Count' and 'Tenuring Threshold'? G1 GC

I am looking at a garbage collection report and at the bottom there is the Tenuring Summary section which contains a metric Survival Count - what is this? This is not a metric that I can explicitly see in the GC logs when adding…
Tim
  • 284
  • 1
  • 4
  • 20
0
votes
1 answer

InputStream become closed (fatjar/überjar over OpenJ9_11.0.8.10 debian x64)

I'm facing a strange behavior at my enviroment. I have a fatjar of my spring application and I running it in a docker container based on adoptopenjdk/openjdk11-openj9:jdk-11.0.8_10_openj9-0.21.0-debian-slim and using the garbage collector G1GC. The…
Beto Neto
  • 3,962
  • 7
  • 47
  • 81
0
votes
0 answers

Enable G1GC Garbage Collector

I'm trying to install Kafka in a Jetson Nano (aarch64 architecture) and i'm facing with some problems in installation. I am following the steps of the Kafka installation tutorial (Kafka Quickstart Guide) and when i execute the…
João Castilho
  • 487
  • 4
  • 19
0
votes
0 answers

WebLogic Managed server start taking more time after application deployment

i have deployed flexcube application, after the deployment my managed server startup is taking almost 50 min but still it's in starting position, i have allocated -xms16g -xmx16g g1gc, could someone help me to identify the issue, i have attached the…
0
votes
1 answer

GC1 does not release OS-Memory

I run a java application with the default Garbage Collector(G1GC). I don't get when the G1CC exactly releases memory. in htop I saw that 700M where used by the application. After I did jcmd GC.run it dropped down to about 250M. Is this meant…
user2071938
  • 2,055
  • 6
  • 28
  • 60
0
votes
0 answers

Metaspace out of memory even 20-30% or more space free

A Keycloak/JBoss server running using Java 8 was switched to G1GC and a -XX:MaxMetaspaceSize was set to 256MB. It soon stopped responding with logs filling up with OutOfMemory: Metaspace errors. GC logs were not enabled. Server was hooked with…