RE: Memory usage problem

2007-12-19 Thread Caldarale, Charles R
 From: Christoph Sperle [mailto:[EMAIL PROTECTED] 
 Subject: Memory usage problem
 
 As you can see, tomcat uses 138m, even though, it was start 
 up with 64m restriction (-Xmx64m).

You're confusing heap size (-Xmx) with total process space.  The total
process space includes many other things besides the JVM heap, such as
code banks, stacks, internal JVM structures, OS-related structures, etc.
Even so, 138M is pretty tiny, these days.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Memory usage problem

2007-12-19 Thread Christoph Sperle
Hello all

I run tomcat on a virtual private server with very limited resources.
Therefore I want tomcat to run with very restrictive memory usage. I
tried hard to get this done, but with no success. Tomcat uses as much
memory as it wants to use, regardless of the specified startup settings.

OS: Ubuntu Server 6.10

Tomcat: 5.0.30

'ps':
tomcat5 26107 0.7 3.5 341488 141492 ? Sl 08:18 3:01
/usr/lib/j2sdk1.5-sun/bin/java -Djava.awt.headless=true -server -Xms48m
-Xmx64m ...

'top':
26107 tomcat5   17   0  333m 138m  16m S0  3.5   3:02.97 java

As you can see, tomcat uses 138m, even though, it was start up with 64m
restriction (-Xmx64m).

What's wrong here?

Kind regards
Christoph Sperle

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Memory usage problem

2007-12-19 Thread Christoph Sperle
Thank you Chuck, you are right.

But for me, that remains a big problem (and I read about it many times
in VPS forums too): How to restrict the process size of tomcat?

If I stop tomcat and measure the free memory (on a VPS that's not easy
at all, see
http://www.webhostingtalk.com/showpost.php?p=4851698postcount=6):

Used memory = 86m

After I started tomcat (with my single webapp and heap restricted to
64m):

Used memory = 365m

That's 280m - more as four times of the heap size restriction! I never
saw this behavior at any other java program.

Do you have a hint to restrict/reduce the overall process memory tomcat
uses.

Thanks
Christoph

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Mittwoch, 19. Dezember 2007 15:42
To: Tomcat Users List
Subject: RE: Memory usage problem

 From: Christoph Sperle [mailto:[EMAIL PROTECTED] 
 Subject: Memory usage problem
 
 As you can see, tomcat uses 138m, even though, it was start 
 up with 64m restriction (-Xmx64m).

You're confusing heap size (-Xmx) with total process space.  The total
process space includes many other things besides the JVM heap, such as
code banks, stacks, internal JVM structures, OS-related structures, etc.
Even so, 138M is pretty tiny, these days.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Memory usage problem

2007-12-19 Thread Caldarale, Charles R
 From: Christoph Sperle [mailto:[EMAIL PROTECTED] 
 Subject: RE: Memory usage problem
 
 Do you have a hint to restrict/reduce the overall process 
 memory tomcat uses.

1) Eliminate unnecessary items in server.xml (e.g., unused connectors).

2) Reduce the number of threads configured for each connector.

3) Don't deploy any unnecessary webapps (eats up file descriptors).

4) Package webapp classes into as few jars as possible (more file
descriptors).

5) Insure the applications aren't opening files or starting auxiliary
threads unnecessarily.

Don't know how much any of the above will help, since the impact is very
dependent on the particular OS you're using and how efficient it is at
conserving resources.

 - 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 start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]