简体   繁体   中英

Xmx and gc log max heap size difference?


Need to know why there is difference between and 之间存在差异
1563.749: [GC 1563.749: [ParNew: 226929K->11859K(235968K), 0.0605702 secs] 735329K->523980K( ), 0.0616580 secs] ),0.0616580秒]

-Xmx parameter specifies only the maximum heap size. JVM is free to choose any size lower than that and it could dynamically change. You could also specify initial heap size via -Xms and if you set it equal to -Xmx presumably heap size shouldn't change much.

UPDATE: Now when you mentioned that you also have -Xms == -Xmx my answer above no longer applies. Looking at your numbers again it appears that they're actually pretty close:

1,792M = 1,835,008K

So looks like the reported discrepancy is just about 27M or just slightly over 1%. Why is it concerning you?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM