Used heap metric
Aleksey Shipilev
aleksey.shipilev at gmail.com
Thu Apr 16 09:57:22 UTC 2020
Hi,
(this was stuck somewhere in moderator queue)
On 4/16/20 12:55 AM, Kamil Konior wrote:
> I would appreciate any confirmation that an issue which i am facing may be caused by shenandoah. The
> problem is that used heap jmx metric, shows twice as much as it should be.
>
> using jmap -heap <pid>
> Heap Usage:
> Shenandoah Heap:
> regions = 2944
> capacity = 49392123904 (47104.0MB)
> used = 38895279960 (37093.429527282715MB)
> committed = 49392123904 (47104.0MB)
>
> Where jmap -histo <pid>, shows 19102819072 ( 18217.8679 MB ) and from my calculations it is correct
> number. Rarely even used heap metric show correct numbers, so sometimes It works properly.
I don't think this is Shenandoah-specific.
"used" = memory taken by Java heap, including everything: both live objects and not-yet-reclaimed
garbage. It would be larger than the actual live data available, which I presume what jmap -histo
counts. If you do more GCs, especially after ShenandoahGarbageThreshold went down [1], or you
enabled "compact", those should eventually match up.
Thanks,
-Aleksey
[1] https://bugs.openjdk.java.net/browse/JDK-8242042
[2] -XX:ShenandoahGCHeuristics=compact
More information about the shenandoah-dev
mailing list