tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Caldarale, Charles R" <Chuck.Caldar...@UNISYS.com>
Subject RE: 1067 error when starting service after allocating more memory to JVM
Date Sun, 08 Aug 2004 07:15:03 GMT
> 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


Mime
View raw message