You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Robinson, Eric" <er...@psmnv.com> on 2010/06/16 16:42:26 UTC

Setting the Right Amount of Memory

 
We run 150+ instances of tomcat on one server. To optimize memory
utilization, each tomcat instance is configured with 64MB by default
(export JAVA_OPTS="-ms64M -mx64M"). We then watch for
Java.Lang.OutOfmemory errors in the logs. If we see any of these over
time, we allocate additional RAM in 32MB increments until that instance
stops throwing errors. Most instances are happy with 64MB. Some need
96MB or 128MB. We have never seen a tomcat instance that throws
OutOfMemory errors with 256MB RAM.

If tomcat is not throwing OutOfMemory errors and system responsiveness
is good, is there really any reason to allocate higher amounts of RAM?

--
Eric Robinson


Disclaimer - June 16, 2010 
This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of . Warning: Although  has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments. 
This disclaimer was added by Policy Patrol: http://www.policypatrol.com/

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


Re: Setting the Right Amount of Memory

Posted by Andrew Bruno <an...@gmail.com>.
Hi Eric,

Just wondering, what tools do you use to manage all the instances?
Also, what do you use to look for the OutOfMemory in logs?  I am
looking at Splunk too.

Andrew


On Thu, Jun 17, 2010 at 12:42 AM, Robinson, Eric
<er...@psmnv.com> wrote:
>
> We run 150+ instances of tomcat on one server. To optimize memory
> utilization, each tomcat instance is configured with 64MB by default
> (export JAVA_OPTS="-ms64M -mx64M"). We then watch for
> Java.Lang.OutOfmemory errors in the logs. If we see any of these over
> time, we allocate additional RAM in 32MB increments until that instance
> stops throwing errors. Most instances are happy with 64MB. Some need
> 96MB or 128MB. We have never seen a tomcat instance that throws
> OutOfMemory errors with 256MB RAM.
>
> If tomcat is not throwing OutOfMemory errors and system responsiveness
> is good, is there really any reason to allocate higher amounts of RAM?
>
> --
> Eric Robinson
>
>
> Disclaimer - June 16, 2010
> This email and any files transmitted with it are confidential and intended solely for Tomcat Users List. If you are not the named addressee you should not disseminate, distribute, copy or alter this email. Any views or opinions presented in this email are solely those of the author and might not represent those of . Warning: Although  has taken reasonable precautions to ensure no viruses are present in this email, the company cannot accept responsibility for any loss or damage arising from the use of this email or attachments.
> This disclaimer was added by Policy Patrol: http://www.policypatrol.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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


Re: Setting the Right Amount of Memory

Posted by David kerber <dc...@verizon.net>.
On 6/16/2010 10:42 AM, Robinson, Eric wrote:
>
> We run 150+ instances of tomcat on one server. To optimize memory
> utilization, each tomcat instance is configured with 64MB by default
> (export JAVA_OPTS="-ms64M -mx64M"). We then watch for
> Java.Lang.OutOfmemory errors in the logs. If we see any of these over
> time, we allocate additional RAM in 32MB increments until that instance
> stops throwing errors. Most instances are happy with 64MB. Some need
> 96MB or 128MB. We have never seen a tomcat instance that throws
> OutOfMemory errors with 256MB RAM.
>
> If tomcat is not throwing OutOfMemory errors and system responsiveness
> is good, is there really any reason to allocate higher amounts of RAM?

Nope.

D

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


RE: Setting the Right Amount of Memory

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Robinson, Eric [mailto:eric.robinson@psmnv.com]
> Subject: Setting the Right Amount of Memory
> 
> If tomcat is not throwing OutOfMemory errors and system responsiveness
> is good, is there really any reason to allocate higher amounts of RAM?

If your heap size is right on the edge of your minimum for a Tomcat instance, you may be doing more GC work than is really needed.  However, if you're satisfied with the response time and CPU utilization, you should be ok.

 - 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