Right, and this walk is done single-threaded today (perhaps it could be parallelized<br>without too much effort?). May be moot with the upcoming changes around perm<br>gen though....<br><br>-- ramki<br><br><div class="gmail_quote">
On Tue, Nov 8, 2011 at 7:58 AM, Jon Masamitsu <span dir="ltr"><<a href="mailto:jon.masamitsu@oracle.com">jon.masamitsu@oracle.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Andreas,<br>
<br>
Hotspot maintains a list of classes that are loaded in the<br>
Dictionary (dictionary.hpp/cpp).  This list does not keep<br>
classes alive.  After marking (when we know what classes<br>
are dead), we walk the list and remove dead classes.<br>
Hotspot does not keep information that says classes have<br>
not been unloaded, so the list is always walked.<br>
<br>
Jon<br>
<br>
On 11/07/11 10:33, Andreas Loew wrote:<br>
> Hi Jon,<br>
><br>
> sorry, a follow-up question from my side: As it shouldn't be the most<br>
> normal thing even for a Java EE app to constantly dereference<br>
> classloaders or single classes that need to be GC'ed:<br>
><br>
> In how far does your statement about increased remark pauses still<br>
> apply in case the PermGen / set of loaded classes has stayed<br>
> completely constant between initial mark and remark (which should be<br>
> the usual case)?<br>
><br>
> And wouldn't there a also be a distinction between PermGen and Old Gen?<br>
><br>
> Many thanks & best regards,<br>
><br>
> Andreas<br>
><br>
> --<br>
> Andreas Loew<br>
> Senior Java Architect<br>
> Oracle Advanced Customer Services Germany<br>
><br>
><br>
> Am 07.11.2011 16:44, schrieb Jon Masamitsu:<br>
<div><div></div><div class="h5">>> Doing class unloading with CMS will often increase the remark pause<br>
>> times<br>
>> and so is not on by default.<br>
>><br>
>> On 11/5/2011 3:29 PM, Martin Hare Robertson wrote:<br>
>>> Hi,<br>
>>><br>
>>> I recently encountered an interesting GC issue with a Tomcat<br>
>>> application. I<br>
>>> came up with a simple repro scenario which I posted to StackOverflow:<br>
>>> <a href="http://stackoverflow.com/questions/8017193/when-does-the-perm-gen-get-collected" target="_blank">http://stackoverflow.com/questions/8017193/when-does-the-perm-gen-get-collected</a><br>
>>><br>
>>><br>
>>> To solve this issue I have been encouraged to use<br>
>>> -XX:+CMSClassUnloadingEnabled.<br>
>>> I currently use the following GC configuration.<br>
>>><br>
>>> -XX:+UseMembar<br>
>>> -XX:+UseConcMarkSweepGC<br>
>>> -XX:+UseParNewGC<br>
>>> -XX:CMSInitiatingOccupancyFraction=80<br>
>>> -XX:+UseCMSInitiatingOccupancyOnly<br>
>>><br>
>>> Is enabling CMSClassUnloadingEnabled likely to have a negative perf<br>
>>> impact?<br>
>>> If not, why is it disabled by default?<br>
>>><br>
>>> Thanks<br>
>>><br>
>>> Martin<br>
_______________________________________________<br>
hotspot-gc-use mailing list<br>
<a href="mailto:hotspot-gc-use@openjdk.java.net">hotspot-gc-use@openjdk.java.net</a><br>
<a href="http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use" target="_blank">http://mail.openjdk.java.net/mailman/listinfo/hotspot-gc-use</a><br>
</div></div></blockquote></div><br>