tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Charles Huey" <stephenh...@fastmail.fm>
Subject RE: 1067 error when starting service after allocating more memory to JVM
Date Sun, 08 Aug 2004 16:51:53 GMT
Thanks, you've been a big help.  1536m worked for me.  So, does this
mean my OS (Win 2K) will limit me and not allow me to allocate more
memory to the JVM even if I install more physical memory in the machine,
or will the amount allowed for allocation continue to rise as long as I
add more memory to the machine?  


----- Original message -----
From: "Caldarale, Charles R" <Chuck.Caldarale@UNISYS.com>
To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
Date: Sun, 8 Aug 2004 02:15:03 -0500
Subject: RE: 1067 error when starting service after allocating more
memory to   JVM

> From: Stephen Charles Huey [mailto:stephenhuey@fastmail.fm]
> Subject: RE: 1067 error when starting service after allocating more memory to JVM
> 
> Aren't the parameters 
> -Xmx and -Xms
> specific to tomcat.exe and not to Windows?

Sounds like you're not that familiar with JVM execution, so you might
want to brush up on that aspect using some of the online tutorials on
the Sun web site (and other places).

The tomcat.exe executable is used when running Tomcat as a Windows
service, and then only as a launcher for the JVM; Tomcat itself is pure
Java, and you can run it as a regular Java program, if need be.  (It's a
lot easier to test things out that way.)  In any event, all I'm
suggesting you do is try something like the following, from a command
prompt:

	java -Xms1024m -Xmx1024m -version
	java -Xms1536m -Xmx1536m -version
	java -Xms1280m -Xmx1280m -version
	(etc.)

where you're varying the heap sizes in powers of two increments trying
to find the largest values that will work on your server.  (I'm assuming
the 2nd example above will fail - it does on my XP boxes, but works on
my Win2K one.)  Use -version, since that is the fastest way in and out
of the JVM (no program need be executed).  Once you've found the maximum
heap size that can be allocated, you can use that for your Tomcat
environment.  (You may have to reduce it a little since Windows needs
space in the process virtual memory for such things as a stack for each
thread, and Tomcat can kick off a lot of threads.)  Whether you want to
keep the minimum and maximum the same depends a lot on your workload;
larger heap sizes take longer to garbage collect, so you may want the
default lower to reduce delay time during not-so-busy periods.

You should really size your heap on what you actually need at times of
peak load.  Setting it to the maximum possible is not always the best
for server responsiveness.

 - 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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


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


Mime
View raw message