Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 to run more often?

like image 724
viji Avatar asked Mar 11 '26 21:03

viji


1 Answers

-XX:ZCollectionInterval=N - set maximum gap between collections to N seconds.
-XX:ZUncommitDelay=M - set the delay until unused memory is returned to the OS to M seconds.

like image 102
the8472 Avatar answered Mar 13 '26 09:03

the8472



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!