I think trying to increase the memory configuration in any application doesn't necessarily contribute to it's speed because the garbage collector does not perform serious attempts to release memory until the heap size limit is reached.
So, having a lower heap size limit (lower max memory setting), ensures that the garbage collector releases as much memory as possible in a shorter interval and having a higher memory setting significantly delays the garbage collection. My suggestion is that it is better to keep the original memory settings than increase it, and only increase it if your project is too large or resource intensive and requires additional memory and not because there's plenty of memory available - why not use it. -Rashmi ----- Original Message ---- From: Rahul Tandon <[EMAIL PROTECTED]> To: Tomcat Users List <[email protected]> Sent: Thursday, March 15, 2007 10:25:22 AM Subject: tomcat 5.5 Hi, I had posted this yesterday and got some feedback from chuck, but still there is no concrete resolution to the problem, if somebody knows anything about this kind of issue, please help me. I am using following configuration: Red Hat Enterprise Linux AS release 3 (Taroon Update 4) 4GB RAM Tomcat version 5.5 Java version "1.5.0_06" Tomcat connectors setting: maxThreads="150" minSpareThreads="25" maxSpareThreads="75" ulimit -a also seems ok: core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) 4 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 7168 virtual memory (kbytes, -v) unlimited . I am using CATALINA_OPTS "-Xms512m -Xmx512m -Djava.awt.headless=true" and tomcat comes up fine and my http requests are processed normal. If I change memory setting to 1024m (-Xmx1024m -Xms512m) then I am getting this error: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:275) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Caused by: java.lang.OutOfMemoryError: unable to create new native thread at java.lang.Thread.start0(Native Method) at java.lang.Thread.start(Thread.java:574) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.<init>(ThreadPool. java:643) at org.apache.tomcat.util.threads.ThreadPool.openThreads(ThreadPool.java:515) at org.apache.tomcat.util.threads.ThreadPool.start(ThreadPool.java:148) at org.apache.tomcat.util.net.PoolTcpEndpoint.startEndpoint(PoolTcpEndpoint.jav a:315) at org.apache.coyote.http11.Http11BaseProtocol.start(Http11BaseProtocol.java:15 0) at org.apache.coyote.http11.Http11Protocol.start(Http11Protocol.java:75) at org.apache.catalina.connector.Connector.start(Connector.java:1089) at org.apache.catalina.core.StandardService.start(StandardService.java:459) at org.apache.catalina.core.StandardServer.start(StandardServer.java:709) at org.apache.catalina.startup.Catalina.start(Catalina.java:551) ... 6 more And tomcat hangs and does not respond to http requests. I am checking vmstat at this time and see 3GB free memory. I would appreciate any help. Thanks, Rahul Tandon ____________________________________________________________________________________ No need to miss a message. Get email on-the-go with Yahoo! Mail for Mobile. Get started. http://mobile.yahoo.com/mail --------------------------------------------------------------------- To start a new topic, e-mail: [email protected] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
