Shapira, 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 log4j. No Realms have been defined. I use Win2k, Tomcat 4.1.12 and JDK 1.3.1_06. Without Using jprobe or OptimizeIt is there a way to check how much memory has been used. Hari -----Original Message----- From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] Sent: Wednesday, January 22, 2003 9:29 AM To: Tomcat Users List Subject: RE: Memory Allocation Howdy, 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 [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, January 21, 2003 4:21 PM >To: [EMAIL PROTECTED] >Subject: Memory Allocation > >Tomcat when starting uses 60M memory in heap. Why is that it is using so >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 full >garbage collection, the heap memory comes down to 11M. Is something >going wrong or is it the way tomcat behaves? > >Hari -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>