Hi Liden, thank you for your quick reply and really sorry for my mistake. I add pictures as attachments this time and we will take your advice to adjust our gc configuration. Following is the caption: Pic1:Available Heap Memory Decrease Gradually During The Second Week Pic2:GC Becomes Very Frequent At Last Which Leads To High Usage Of CPU Pic3:First Part: System.gc Is Called Regularly Second Part:When Stop Calling System.gc Manually,Heap Memory Increase Gradually Again Per Liden <per.liden@oracle.com> 于2019年12月4日周三 下午4:58写道:
Hi,
On 12/4/19 3:42 AM, 李木木 wrote:
Hi, we recently tried zero gc and jdk11 for our online risk-control
ZGC is actually not short for "zero gc" ;)
service to replace of G1 and jdk8.It works well during the first week,but we find the heap memory increase slowly next week,which seems zgc can't recycle garbage normally because if we call system.gc manually ,the heap memory will fall back to normal.Besides,when we use G1 with the same code ,we never met this sitation.Have you met this condition before and give me some advice?
Have you run long enough to see that the heap usage isn't stabilizing at some point?
Calling System.gc() doesn't do anything special, it's just doing a normal GC like any other. However, you might be calling it more often than what ZGC thinks is needed, which could mean that you just happen to see less fragmentation building up. If this is the case, you could lower the tolerated fragmentation using for example -XX:ZFragmentationLimit=10.
(Btw, it seems the mailing list ate your images)
cheers, /Per
Following is configuration: Linux 64 centos 7.4.1708 CPU:40Threads, @2.2GHz MEM:128G OS Disk:240G(SSD) * 2 JVM config: -Xmx105g -XX:+UnlockExperimentalVMOptions
-XX:+UseZGC
Service Type:Web Service Request QPS:2000 JDK Version:11.0.3
Pic1:Available Heap Memory Decrease Gradually During The
Second
Week
[image: 11.png]
Pic2:GC Become Very Frequent At Last Which Leads To High Usage Of CPU
[image: 33.png]
Pic3:First Part: System.gc Is Called Regularly Second Part:Stop Call System.gc Manually,Heap Memory Increase
[image: 22.png]
Look forward to your kind reply,Thanks!