You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ken Bowen <kb...@als.com> on 2010/01/24 20:06:15 UTC
Tomcat heap memory behavior question
Hi all,
I'm trying to understand Tomcat memory usage as observed with
jconsole. I'm using Tomcat 6.0.18 on Mac OS X 10.5.8;
Tomcat is downloaded from the Apache site. I'm starting it with /no/
web applications
at all: just an empty webapps folder, and I'm not hitting it with any
browser.
jconsole shows the following behavior:
Shortly after startup with the heap at 15MB, a GC drops the heap to
just above 5MB.
Over 5 minutes, the heap grows to about 21 MB, at which time another
GC occurs, and it drops to about 6MB.
Over the second 5 minute interval, it rose to a little over 22MB, and
then dropped to just under 5MB.
Then it settles into consistent 5 minute intervals, rising from about
4.8MB to 21.5 MB, then a GC.
So I have three questions:
1) Is this normal Tomcat behavior? Since this is a vanilla Tomcat
download, I assume the answer is yes, but maybe not?
2) What Tomcat activity is consuming the heap?
3) Presumably this means that in planning for a memory restricted
Tomcat + apps, one needs to apportion about 22MB to the Tomcat heap,
apart from heap allocated to applications.
BTW, I verified Chuck's statement that top is bad tool for looking at
Tomcat's heap: at the first pea k rising from 5MB to 21MB, GC dropped
the heap value in jconsole to 6MB, but the RSIZE in top jumped from
54M to 57M.
Thanks in advance,
Ken
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Tomcat heap memory behavior question
Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Ken Bowen [mailto:kbowen@als.com]
> Subject: Tomcat heap memory behavior question
>
> 1) Is this normal Tomcat behavior?
Yes, this is normal.
> 2) What Tomcat activity is consuming the heap?
Depends on what connectors you have configured, your watched resources, autoDeploy settings, etc. All of these are creating objects as they run, even if they find nothing to actually work on. You can enable a heap profiler to see the exact objects and who's creating them.
> 3) Presumably this means that in planning for a memory restricted
> Tomcat + apps, one needs to apportion about 22MB to the Tomcat heap,
> apart from heap allocated to applications.
Sounds reasonable, although the base value will vary somewhat depending on config settings, Tomcat version, JRE version, OS, and platform.
When sizing, don't forget about PermGen usage, which is not part of the heap and is largely dependent on the number of classes in your webapps.
- 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 unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org