Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Struts - A MVC web framework
Tomcat - JSP/Servlet container
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
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
JSP - A mailing list about Java Server Pages specification and reference
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
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
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
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
Tomcat heap memory allocation in Linux

Tomcat heap memory allocation in Linux

2003-09-24       - By sqdang@(protected)

 Back
Reply:     1     2  

Hi,

I am using tomcat 4.1.27 running on Red Hat Linux 9 and Sun's JDK 1.4.1_01.  
Here is my issue.  I wanted to allocate more heap space to run tomcat.  So, I
placed the following line in the file catalina.sh:

 JAVA_OPTS="-Xms256m -Xmx400m"

I shut down tomcat, reboot linux, and started tomcat.  I executed the command
top to verify the memory is actually being used up by tomcat.  Here is the
result of the top command:

CPU states:  0.5% user,  8.7% system,  0.0% nice, 90.7% idle
Mem:   384716K av,  183864K used,  200852K free,       0K shrd,   18980K buff
Swap:  257000K av,   28672K used,  228328K free                   59340K cached

If you noticed, memory usage is less than the 256MB that I specified.  If you
consider that other processes are also running, tomcat is not consuming the
initial 256MB that I specified in the JAVA_OPTS.  I thought maybe the start
command for tomcat is worry.  So, I ran a ps on the tomcat process and got the
following:

UID        PID  PPID  C STIME TTY          TIME CMD
root      6982     1  0 15:11 pts/1    00:00:11 /var/app/java/bin/java -
Xms256m -Xmx400m -Djava.endorsed.dirs=/var/app/tomcat/bin:/v

I think this showed the executed command to start tomcat is correct.  I am not
sure what is going on.  Is the top command not returning an accurate reading?  
Am I forgot to do something here?  By the way, I also tried CATALINA_OPTS
instead of JAVA_OPTS and got the same result.

Here is the strange thing.  When I used the JAVA_OPTS with tomcat 4.1.27
running on Windows2000 server and Sun's JDK 1.4.1_01, tomcat is actually
consuming the initial memory that I specified in JAVA_OPTS.

Does anybody have an idea?  Any help would be appreciated.

Thanks,

Son

-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



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