RFR(S) 8186770: NMT: Report metadata information in NMT summary
Zhengyu Gu
zgu at redhat.com
Tue Aug 29 14:35:34 UTC 2017
Hi Andrew,
>> Class summary:
>>
>> - Class (reserved=1071790KB, committed=24750KB)
>> (classes #3078)
>> (malloc=686KB #7122)
>> (mmap: reserved=1071104KB, committed=24064KB)
>> ( Metadata: )
>> ( reserved=22528KB, committed=21504KB)
>> ( capacity=21327KB, used=20654KB)
>> ( free chunks=113KB)
>> ( available=0KB)
>> ( Class space: )
>> ( reserved=1048576KB, committed=2560KB)
>> ( capacity=2525KB, used=2268KB)
>> ( free chunks=0KB)
>> ( available=35KB)
> I think this change is to ship modulo a few small quibbles.
>
> The four figures quoted here for each of the data and class metaspace
> regions don't quite add up i.e.
>
> used + free chunks + available = total_in_use =/= capacity
>
> 2268 + 0 + 35 = 2303 =/= 2525
>
> 20654 + 113 + 0 = 20767 =/= 21327
>
I struggled to come out an intuitive way for representing the numbers.
Hopefully, we can get it right through this review process.
Actually, the formula should be:
committed = capacity + free chunks + available + waste
capacity : amount of all in-used chunks.
used: used amount out of capacity
free chunks: amount of free chunk memory
available: memory that was committed, but has yet to slice into chunks.
>
> As I understand it this is because of waste caused either by the need to
> insert block and chunk headers or by the inability to allocate objects
> out of small fragments at the end of in use chunks. Is that correct?
>
chunk headers are counted in *used* memory.
> If so then would it not be clearer to account for this waste explicitly?
> e.g.
>
> ( Metadata: )
> ( reserved=22528KB, committed=21504KB)
> ( capacity=21327KB, used=20654KB)
> ( free chunks=113KB, available=0KB)
> ( waste = 560KB = 2.6%)
Make sense to report *waste*. How about
( Metadata: )
( reserved=22528KB, committed=21504KB)
( capacity=21327KB, used=20654KB)
( free chunks=113KB)
( available=0KB)
( waste = 560KB = 2.6%)
Thanks,
-Zhengyu
> n.b. the above figures are calculated as
>
> waste = capacity - total_in_use
> waste% = waste / capacity
>
> Also, whether or not waste space gets reported, I think the output would
> look cleaner if you were to report free and available space on one line.
>
> I'm happ
>
> regards,
>
>
> Andrew Dinn
> -----------
> Senior Principal Software Engineer
> Red Hat UK Ltd
> Registered in England and Wales under Company Registration No. 03798903
> Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
>
More information about the hotspot-runtime-dev
mailing list