Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Servlet : Session invalidate
Oracle Connection Pooling in 3 2 2
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Running a Simple JMS Example
Tomcat and webapplication specific java library path
Mapping in workers2 properties
org apache jasper JasperException
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action
   MESSAGE
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
Value attribute of <html:checkbox
url string for connecting jboss to oracle
javax servlet ServletException: BeanUtils populate
5 0 18: Windows XP Pro vs Windows 2000
HTTP Status 404 The requested resource is not available
 
Question on JVM maximum heap size parameter in tomcat

Question on JVM maximum heap size parameter in tomcat

2007-08-02       - By Monimoy Deb

 Back
Hi,
  I am using tomcat5.0 web server in Linux. At the
time of tomcat startup, the maximum heap size for JVM
is  specified using Xmx parameter in catalina.sh, for
e.g.

java -Xms128m -Xmx1337m -classpath
jre/lib/tools.jar:tomcat/bin/bootstrap.jar
org.apache.catalina.startup.Bootstrap start

The issue I found in some linux machines is that if
Xmx parameter is too high, The tomcat does not startup
and the tomcat log entry is as below

" Error occurred during initialization of VM.
Could not reserve enough space for object heap."

When Xmx parameter value is reduced manually then only
tomcat works.  For example,
in one  scenario, the total physical memory of the
machine was 4GB, Xmx parameter
was 2640MB, but tomcat did not start and I got the
message as above. When I reduced the Xmx parameter to
1.5GB, then the tomcat was Started.

I am looking for logic to specifying the optimal value
for Xmx parameter so that the parameter need not be
changed manually. In other
words, is there any relationship between optimal Xmx
value and some of the rseources in machine like total
physical memory, available physical memory,
swap space etc.

Couple of observations that I had:

1. For 32 bit processors the maximum heap size can be
specified is 1.8GB. But tomcat can use both
32 bit processor as well as 64 bit processor

2. When I gradually increase the Xmx parameter and
start tomcat,  just after the maximum Value of Xmx
parameter for which  tomcat works,  I find a Error
message like

" Exception in thread "CompilerThread1"
java.lang.OutOfMemoryError: requested 1292
36 bytes for Chunk::new. Out of swap space?"

So, it seems to me that Java Virtual machine uses swap
space as well as available
Physical memory for allocating maximum Heap size.

So, I am looking for the logic for specifying optimum
value for Xmx parameter which I can specify without
any manual intervention. Please provide me any help on
this.


Thanks
Monimoy



     __ ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ______
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To start a new topic, e-mail: users@(protected)
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.