Hi,
Recently, my company is gradually upgrading JDK from 8 to 17. And I did some tests.
Under the same qps, I found the follow Phenomenon
1. different heap size, Memory Allocation Rate(in zgc gc statistics) are similar
2. the smaller the heap size(bigger gc pressure),the Allocation rate which calculated by com.sun.management.GcInfo(usageBeforeGc- usageAfterGc) is more bigger than Memory Allocation Rate(in zgc gc statistics)
3. the bigger the heap size,the Allocation rate which calculated by com.sun.management.GcInfo is more close to Memory Allocation Rate(in zgc gc statistics)
I wonder what mechanism causes this. Why the more bigger gc pressure, the Allocation rate which calculated by com.sun.management.GcInfo is more bigger
Thanks,
Wang kang