On 18/06/2012 09:52, Konstantin Kolinko wrote:
2012/6/16 Miguel González Castaños<miguel_3_gonza...@yahoo.es>:
Dear all,

   We have a webapp under Tomcat 5.5 and jdk 1.5 32 bits under a virtual
machine of 4 Gb and a 64 bits OS.
4 Gb is memory size?
Yes

   Some of you have helped me suggesting me to install Javamelody and sar to
monitor the system. Setting up heap dumps I have managed to see what was
going on with the eclipse memory analyzer.

   The webapp sends emails that have been previously entered into the
database. It loads the emails into memory, so if you are sending 10k emails,
it loads 10k objects containing those emails. That makes the app to use
around 200-300 mb of the heap memory.
Do you need to keep 10k of them in the memory at the same time?
Usually one would send mails one by one and release their memory
immediately.
I don't. Fortunately the developer has corrected this, so probably other issues will arise but not this one.


  The settings we have now for the JDK are:

  CATALINA_OPTS="$CATALINA_OPTS -XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=/opt/tomcat5/logs/ -Xms128m -Xmx512m -verbose:gc
-XX:+PrintGCTimeStamps -XX:+PrintGCDetails"

  Facts that I have witnessed:

  If I try to increase the Xmx to 740m or 1024m the GC starts working very
much and Tomcat shuts down.
GC? Or OS memory swapping?
GC, no swapping reported by sar.

  I have also tried downloading a 64 bits 1.7 jdk but I get the typical:

  Java HotSpot(TM) 64-Bit Server VM warning: Exception
java.lang.OutOfMemoryError occurred dispatching signal SIGTERM to handler-
the VM may need to be forcibly terminated
64-bit JVM usually needs more memory than 32-bit one,  because memory
address range is wider and pointers need more memory.
I know, but how do I know how much ram to assign in a 64 bits jdk? We are planning to move to a bigger server (hopefully 16 or 32 gb).

Miguel

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

Reply via email to