G1GC, Java8u40ea, Metaspace questions

Yu Zhang yu.zhang at oracle.com
Thu Mar 5 19:00:53 UTC 2015


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
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/hotspot-gc-use/attachments/20150305/109c86cc/attachment-0001.html>


More information about the hotspot-gc-use mailing list