You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Durfee, Bernard" <Be...@suny.edu> on 2005/04/12 21:12:09 UTC

Garbage Collection

How is garbage collection controlled in Tomcat 5.5? I ran a bit of an
experiment by profiling Tomcat 5.5.7 while running a web application. I
ran a load test against the application that finished with the allocated
object size just below the heap size. If it grew any more, garbage
collection would run. So the load test was done and with Tomcat idle,
the garbage collector never ran. It would seem like a good time to run
the garbage collector.

As is stands now the next person to hit the application will push the
heap size over the limit and they will have to wait for garbage
collection. Seems like Tomcat should either attempt to trigger the
garbage collector when idle.

Bernard Durfee

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


RE: Garbage Collection

Posted by Pete Guyatt <pg...@telesoft-technologies.com>.
Hi There,

	Tomcat does not control the garbage collection, it is up to the JVM to
decide if and when a garbage collection is performed. The only way you can
request a garbage collection is by using the System.gc() method, which the
JVM can ignore.

For more information on this Topic read the documentation for the JVM that
you are using.

Pete

-----Original Message-----
From: Durfee, Bernard [mailto:Bernard.Durfee@suny.edu]
Sent: 12 April 2005 20:12
To: Tomcat Users List
Subject: Garbage Collection


How is garbage collection controlled in Tomcat 5.5? I ran a bit of an
experiment by profiling Tomcat 5.5.7 while running a web application. I
ran a load test against the application that finished with the allocated
object size just below the heap size. If it grew any more, garbage
collection would run. So the load test was done and with Tomcat idle,
the garbage collector never ran. It would seem like a good time to run
the garbage collector.

As is stands now the next person to hit the application will push the
heap size over the limit and they will have to wait for garbage
collection. Seems like Tomcat should either attempt to trigger the
garbage collector when idle.

Bernard Durfee

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org