Howdy,
Don't blindly increase the max memory: figure out how much your
application SHOULD need in order to handle the expected maximum load
with an acceptable response time.  Set your app to that number and
load-test it.  Repeat until you arrive at the true max memory needed for
your app.  It may be more than 500MB or much less.

And do not blindly set -Xms=-Xmx, that's old advice that some people
take as a rule of thumb.  Allocation costs on JDK 1.4 and later are
cheap.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: David Rees [mailto:[EMAIL PROTECTED]
>Sent: Saturday, December 13, 2003 5:52 PM
>To: Tomcat Users List
>Subject: Re: setting opts to avoid OutOfMemory errors
>
>Hans Steinraht wrote:
>
>> Maybe someone can help me out with some questions I have to avoid the
>> OutOfMemory errors that I have from time to time
>>
>> The computer where Tomcat, version 4.1.24, is running is a linux
machine
>> wit 500M memory
>> and j2sdk1.4.1.
>>
>> I have read in this newsgroup that the solutions to avoid OutOfMemory
>> errors is to set the
>> initial size of the memory allocation pool Xms to a value and also
the
>> max size Xmx.
>>
>> In this I have to questions:
>>        1. what are the best values?
>>        2. happends when I set the values to high?
>>
>> I have tried running tomcat with JAVA_OPTS="-Xms64m -Xmx256m", but
the
>> problem still occurs, so can I set Xmx to 500m, but what is than
>happening
>> with the memory left (maybe there isn't) for tha other applications
on
>thie
>> machine.
>
>All increasing the -Xmx256M setting will do is delay the onset of the
>OOM condition, it won't fix it.  If you compile a lot of JSPs, make
sure
>that in the container's web.xml you set the fork attribute of the
>JspServlet to true or use jikes, otherwise that will leak memory as
well.
>
>With a machine that has 500M, I wouldn't use more than 256M for Tomcat
>unless nothing else is running on it.
>
>-Dave
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




This e-mail, including any attachments, is a confidential business communication, and 
may contain information that is confidential, proprietary and/or privileged.  This 
e-mail is intended only for the individual(s) to whom it is addressed, and may not be 
saved, copied, printed, disclosed or used by anyone else.  If you are not the(an) 
intended recipient, please immediately delete this e-mail from your computer system 
and notify the sender.  Thank you.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to