tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hari Venkatesan" <>
Subject RE: Memory Allocation
Date Wed, 22 Jan 2003 15:31:54 GMT

Thanks for your suggestion. When you startup Tomcat with -Xms10m and
-Xmx10m it does a lot of Full GC before it can bring up and finally
settles down to use 7.2megs using a debugger.

Without a debugger tomcat still comes up after doing a lot of Full GC's.

I have just one application in my context in my server.xml and have just
2 load-on-startup servlets which is not big (one gets the roles from
ldap server which loads a maximum of 5 roles  and the other starts up

No Realms have been defined. I use Win2k, Tomcat 4.1.12 and JDK

Without Using jprobe or OptimizeIt is there a way to check how much
memory has been used. 


-----Original Message-----
From: Shapira, Yoav [] 
Sent: Wednesday, January 22, 2003 9:29 AM
To: Tomcat Users List
Subject: RE: Memory Allocation

Whoa there ;)  Be very careful about some things:

- The amount of memory tomcat takes on startup is variable.  This
changes with tomcat version, OS version, JDK version, configured webapps
and their listeners / filters / load-on-startup servlets, any
Loggers/Valves/Realms configured for tomcat in server.xml, etc.  As you
can see this is many variables.

- Using a debugger such as JProbe or OptimizeIt may inflate the memory
usage of a system by a factor of 10 or more.

- What the other guy said about the default heap set at 64MB -- the
default heap MAXIMUM is set as 64MB.  The default minimum is very small,
again depending on JDK version and flags used.  

For an illustration, try the following:
- Set -Xmx10m in your JAVA_OPTS to allow only 10MB on the heap.
- Start tomcat without a debugger.  You shouldn't have a problem.
- Try to start tomcat with a debugger.  See what happens ;)

Yoav Shapira
Millennium ChemInformatics

>-----Original Message-----
>From: Hari Venkatesan []
>Sent: Tuesday, January 21, 2003 4:21 PM
>Subject: Memory Allocation
>Tomcat when starting uses 60M memory in heap. Why is that it is using
>much memory in heap. I found this by running jprobe memory debugger. I
>have just one application in the context of server.xml file and don't
>think the entire application gets loaded into memory. After doing a
>garbage collection, the heap memory comes down to 11M. Is something
>going wrong or is it the way tomcat behaves?

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message