G1GC, Java8u40ea, Metaspace questions
Wolfgang Pedot
wolfgang.pedot at finkzeit.at
Thu Mar 5 20:41:34 UTC 2015
Jenny,
thanks for getting back to me with this info. I think I found a good
setting for now and I am letting a smaller system run with that under
more normal use (most concurrent cycles triggered by heap with only some
Metaspace-spikes).
Definetly looking forward to use this "for real" after 8u40 is released.
As for my thoughts below:
As far as I know otherwise unused Classes are kept alive by their
ClassLoaders which are stored in the heap, right? So if Classloaders get
promoted to oldGen mixedGCs are required to clean them up before the
Classes can be unloaded in the next concurrent cycle. That would explain
why it usually takes an additional concurrent cycle (triggered by
heap-occupation) after a spike of class generation before Metaspace
usage returns to normal. Or maybe stuff that keeps the ClassLoaders
alive needs to be collected first...
regards
Wolfgang
Am 05.03.2015 20:00, schrieb Yu Zhang:
> Wolfgang,
>
> Thanks for reporting this. I can reproduce this behavior with a micro.
> After consulting with Stefan and Jon, it is the current behavior. For
> now you can keep MaxMetaspaceFreeRatio low to bring HWM down. We
> might file an enhancement bug on this.
>
> You do not need a mixed gc to clean metaspace.
> Thanks,
> Jenny
> On 2/19/2015 3:46 AM, Wolfgang Pedot wrote:
>> One more, something just came to me:
>>
>> Class unloading happens during the concurrent marking-cycle so the
>> mixed collects that would free up unused classloaders in oldGen
>> happen after that, right?
>> That would mean the classes can only be cleaned up at the next cycle
>> and stay in Metaspace until then. My test causes only
>> Metaspace-triggered concurrent cycles so the garbage-collector is
>> always behind by one cycle and therefor the amount of classes that
>> can be unloaded can be different each time, irregardless of the
>> percentage of wasted heap. I guess I have to extend my test-scenario
>> in a way that also causes at least some heap-driven concurrent cycles
>> and see what happens then.
>> Still does not explain why I hardly ever see HWM go down but it
>> explains some of my more confusing test-results...
>>
>> regards
>> Wolfgang
>>
>
--
Mit freundlichen Grüßen
Wolfgang Pedot
F&E
—————————————————
Fink Zeitsysteme GmbH | Möslestraße 19-21 | 6844 Altach | Österreich
Tel: +43 5576 72388 | Fax: +43 5576 72388 14
wolfgang.pedot at finkzeit.at | www.finkzeit.at
Landesgericht Feldkirch, 72223k | USt.ld: ATU36401407
Wir erbringen unsere Leistungen ausschließlich auf Basis unserer AGB und Leistungs- und Nutzungsvereinbarung, die wir auf unserer Webseite unter www.finkzeit.at/rechtliches veröffentlicht haben.
More information about the hotspot-gc-use
mailing list