> From: Stefan Baramov [mailto:[EMAIL PROTECTED] > Subject: Re: Tomcat process on windows > > Reloading an app leads to creating a new class loader to load > all of the application classes. The old class loader is still > there it is just not used.
The old class loader will be discarded if the app is implemented properly. Read the FAQ: http://tomcat.apache.org/faq/memory.html and especially this article: http://opensource.atlassian.com/confluence/spring/pages/viewpage.action? pageId=2669 > Now, as far as I know (I can be mistaken), the garbage > collection of PermGen is turned off by default. You are mistaken. It's never been off by default in any release of a Sun JVM since at least 1.2. > Even more, no garbage collection of PermGen is implemented in > JDK 4 and lower. That is totally incorrect. (BTW, there was no PermGen until JRE 1.4 was released, other than a prototype 1.3 HotSpot that was not generally available.) In a HotSpot-based JVM (Sun 1.4 and above), PermGen is only collected during a full GC, which is avoided as much as possible. However, a full GC is always done before returning an OOME for a potentially satisfiable allocation request. > -XX:PermSize=64m > -XX:MaxPermSize=160m Better to make PermSize and MaxPermSize the same, and 160m is probably too small for any serious work. There are lots of temporary classes and interned String objects created by most app servers, and an insufficiently sized PermGen will result in more frequent full GCs and associated application pauses. > -XX:+CMSClassUnloadingEnabled > -XX:+CMSPermGenSweepingEnabled The above only apply when Concurrent Mark-Sweep garbage collection is enabled, which it is not by default. This is a good introduction to HotSpot GC: http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]