You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Chirag <ch...@hotmail.com> on 2006/04/21 21:31:47 UTC

Reducing Tomcat (Embedded Or Regular) memory

Hi,

We are trying to upgrade Tomcat from an older version 3.x to 5.x and noticing 
that Tomcat 5.x requires quite more memory than 3.x. We are running it in 
constrained env. with limited  memory and other resources.
 
In order to fully explore all possibilities, we  also ran Embedded Tomcat for 
our web apps and it seems to be saving some memory but not significantly less 
than regular tomcat. (About 3MB saving in embedded)
 
Regular tomcat 5.x with our webapps(total 5) takes about ~66m (RSS portion)
Embedded tomcat with above apps takes about ~63m (RSS portion)
 
I am curious to know are there more tweaks that can be tried on Embedded 
Tomcat to  reduce 
memory usage further ? We tried Embedded Tomcat that creates shared class 
loader and set it as parent classloader on Tomcat engine and adding all of our 
webapps context in engine, which seems to be saving memory upto 3 MB.
 
Is Embedded Tomcat going to help further in reducing memory usage in general 
(more than 3mb)  ?

Are there more ways to reduce memory in regular Tomcat 5.x ? (server.xml is 
pretty much trimmed down to bare minimum, no JMX listens, min threads , no 
extra connectors etc)
 
What portion of Tomcat code internals we can not build Or trim in regular 
Tomcat to save more, if any ?
 
Thanks for your help.
 
Thanks,
Chirag



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


Re: Reducing Tomcat (Embedded Or Regular) memory

Posted by manivannan57 <ma...@aim.com>.
1) remove unnecessary jars (you think) form <your-web-app>/WEB-INF/lib and
<tomcat-home>/common/lib
2) remove unnecessary classes from <webapp-root>/WEB-INF/classes
3)stop loading unnecessary (other) web applications.
4) avoid the <load-on-startup> in web.xml - (this will avoid loading
servlets and other classes during startup).
5)avoid connection pooling, and other possible pooling (if you are using).
However this may affect your performance.
6) avoid storing *very fat* objects in session, application, pagecontext and
similiar objects.

Hope, this would help  in saving a considerable memory.

-
Manivannan Palanichamy
http://www.geocities.com/manivannan57


--
View this message in context: http://www.nabble.com/Reducing-Tomcat-%28Embedded-Or-Regular%29-memory-t1488640.html#a4037105
Sent from the Tomcat - User forum at Nabble.com.


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