A low latency garbage collector capable of handling heaps ranging from a few gigabytes to multi terabytes in size, with GC pause times not exceeding 10ms.
Questions tagged [zgc]
30 questions
14
votes
4 answers
The Java ZGC garbage collector USES a lot of memory
I built a simple application using Springboot.The ZGC garbage collector I use when deploying to a Linux server USES a lot of memory..I tried to limit the maximum heap memory to 500MB with Xmx500m, but the JAVA program still used more than 1GB. When…

greyWolf
- 141
- 1
- 4
5
votes
1 answer
Getting 'allocation stall' when enabling ZGC
I am testing the new zgc garbage collector that was included in java 11 since it promises really low latency. Our application is a real-time service that creates and destroys many objects per second and it does it in a multi-threaded environment…

hveiga
- 6,725
- 7
- 54
- 78
5
votes
1 answer
What exactly does the letter "Z" refer to in the name ZGC in JDK11?
I have heard that JDK 11 introduces a new garbage collector strategy named ZGC, but I cannot find what this stands for. What does the letter "Z" mean? Does it have any specific meaning?

Dolphin
- 29,069
- 61
- 260
- 539
4
votes
0 answers
How to get zGC allocation stall times from the JVM?
How can I get the total allocation stall time due to zGC Garbage Collection in my Java application from the JVM (not the gc.log)?
I saw this interesting answer: https://stackoverflow.com/a/13915440/992432, but looking at the the docs for…

Scott Skiles
- 3,647
- 6
- 40
- 64
4
votes
1 answer
ZGC not supported with OpenJDK 11 and macOS?
I'm trying to run a spring boot application with ZGC Garbage Collector, with following JVM options passed in build.gradle:
bootRun {
jvmArgs = ["-XX:+UnlockExperimentalVMOptions", "-XX:+UseZGC", "-Xlog:gc*"]
}
While running an app (gradle…

Dargenn
- 372
- 4
- 11
3
votes
1 answer
Is there an interface of read barrier in CoreCLR's standalone GC?
It seems that there's no interface of read barrier in CoreCLR.
Recently I have implemented a pauseless GC in C. Here's my project:
https://github.com/LizBing/Uboa-Garbage-Collector
I tried customing a standalone GC library which can be used in .net.…

Lizbing
- 31
- 3
2
votes
1 answer
JDK 17.0.1 ZGC allocation stall on fast allocation rate
We're using ZGC on JDK 17.0.1. The application successfully runs without unexpected GC stalls for a period of time, after which it gets into a state where the ZGC does not free much memory when the GC is being done. This results in multiple periodic…

0x00
- 141
- 2
- 10
2
votes
2 answers
high cpu usage on openjdk zgc
I am trying to use zgc in product environment, so I updated jdk from jdk8 to openjdk 15, tomcat 8 to tomcat 8.5, and the gc related options, but the cpu usage goes to 1000+% after a few hours later of the jvm start(normal cpu usage should be…

xiaoxxcool
- 311
- 4
- 8
2
votes
2 answers
Does the ZGC garbage collector support string deduplication?
Since it is not listed as an option at https://wiki.openjdk.java.net/display/zgc/Main I assume it is not supported. Some tests code made me wonder if it is supported?

Nick Russler
- 4,608
- 6
- 51
- 88
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
Safepoint+stats log with None vmop operation in output JDK12
I am running application on the JDK12 with the -Xlog:safepoint+stats=debug:file=safepoint.log vm parameter to log the safepoint actions and running with ZGC. I have the problem to understand the log output:
[1408.417s][debug][safepoint,stats] …

HPCS
- 1,434
- 13
- 22
1
vote
1 answer
GC warning about "memory mappings per process" and JVM crash after migrating to java 17
We are migrating our java 8 application to java 17, and switching the GC from G1GC to ZGC. Our application is running as a container and the only difference between base-images of these two is the version of java. For example for java 17…

Arya
- 2,809
- 5
- 34
- 56
1
vote
0 answers
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 grown from a baseline other services…

RMSD
- 476
- 5
- 12
1
vote
1 answer
What does ZGC SoftMaxHeapSize really do?
I understand the aim of SoftMaxHeapSize, but I can't find what it really does. Hopefully someone familiar with JDK internals can shed some light.
Specifically, when the soft limit is reached:
Does it simply change ZCollectionInterval and…

Aleksandr Dubinsky
- 22,436
- 15
- 82
- 99
1
vote
3 answers
Make ZGC run often
ZGC runs not often enough. GC logs show that it runs once every 2-3 minutes for my application and because of this, my memory usage goes high between GC cycles (as high as 90%). After GC, it drops to as low as 20%.
How to increase GC run's frequency…

viji
- 2,706
- 5
- 28
- 34