Mats Eklund wrote:
Thanks a lot!
In the Java tab I have the Java Options field with parameters such as
"-Dcatalina.home...". So I just add another few lines to it with the "-Xms..."
parameters?
Basically, yes. But see below.
There are a few fields below that field called: initial memory pool, maximum
memory pool, thread stack size. Should I maybe use these fields instead?
I believe you should leave "thread stack size" alone.
But the "memory pool" parameters may be the same as the -Xms/-Xmx
settings. Really, I just don't know, I just suspect. Maybe someone else
can confirm.
And finally, when nothing is specified here, what are the defaults? I have
tried to find out by looking into some log files but havent found anything.
You should browse the pages I mentioned below to make sure. It's in
there somewhere (and these documents are very informative).
I think I remember that the default varies according to the platform,
and according to whether the JVM is started in "server" or "client" mode
(if that still makes a difference with the 1.6 JVM). And I also think
that it is either 64 or 128 MB. Anyway, 256 MB is higher than the default.
--- On Tue, 3/9/10, André Warnier <a...@ice-sa.com> wrote:
From: André Warnier <a...@ice-sa.com>
Subject: Re: Memory settings
To: "Tomcat Users List" <users@tomcat.apache.org>
Date: Tuesday, March 9, 2010, 9:59 PM
Mats Eklund wrote:
Hi,
I'm using Tomcat 5.5 on Windows and am sometimes experiencing exceptions thrown
in my web application:
"java.lang.OutOfMemoryError: Java heap space". I will profile my
application to see if this can be avoided by changing the code,
however, I'm also interested to know whether and how memory available
to the application can be configured.
Short version :
(Presuming you installed Tomcat using the "service installer",)
go to the Tomcat/bin directory and double-click the tomcat5w.exe program. This
is a GUI allowing you, in one of the tabs, to set the JVM options used to run
Java, which runs Tomcat.
Use the options "-Xms256m -Xmx256m" for example to set the size of the Heap at
start to 256 MB (-Xms) and maximum size 256 MB (-Xmx).
Setting both to the same value is a bit more efficient, because it avoids the
JVM having to keep track and resize this dynamically.
Long version :
http://java.sun.com/javase/technologies/hotspot/gc/index.jsp
http://java.sun.com/javase/technologies/hotspot/gc/memorymanagement_whitepaper.pdf
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org