Strange memory-behaviour using Tomcat Native

2010-04-08 Thread Gregor Schneider
Hi there,

we do observer a strange behaviour of memory-consuption when running
Tomcat within native mode (via jsvc).

First, our configuration:

Using CATALINA_BASE:   /srv/someServer/catalina_base
Using CATALINA_HOME:   /srv/someServer/catalina_base
Using CATALINA_TMPDIR: /srv/someServer/catalina_base/temp
Using JRE_HOME:/usr/lib/jvm/java-6-sun
Using CLASSPATH:   /srv/someServer/catalina_base/bin/bootstrap.jar
Server version: Apache Tomcat/6.0.26
Server built:   March 9 2010 1805
Server number:  6.0.26.0
OS Name:Linux
OS Version: 2.6.26-2-686
Architecture:   i386
JVM Version:1.6.0_12-b04

Besides, said Linux-bix is running within VMWare ESX Server 3i 3.5.0
build 123629

We specified the memory inside the startup-procedure as follows:


CATALINA_OPTS=-XX:MaxPermSize=384m -Xms512m -Xmx512m
-Djava.library.path=$CATALINA_BASE/bin/tomcat-native-1.1.20-src/jni/native/.libs
$JPDA_OPTS

However, taking a look at memory-consumption using top gives the following:

top - 13:04:15 up 7 days,  1:15,  1 user,  load average: 0.06, 0.02, 0.00
Tasks:  72 total,   1 running,  71 sleeping,   0 stopped,   0 zombie
Cpu(s):  0.0%us,  0.5%sy,  0.0%ni, 99.3%id,  0.0%wa,  0.0%hi,  0.2%si,  0.0%st
Mem:   3043600k total,   624960k used,  2418640k free,95288k buffers
Swap:   329292k total,0k used,   329292k free,   220852k cached

  PID USER  PR  NI  VIRT  RES  SHR  S   %CPU %MEMTIME+  COMMAND
12712 tomcat20   0   967m  77m  8068 S02.6
0:06.84 jsvc

Oops - what am I missing here? My expectation where, that
CATALINA_OPTS are adhered to, even when starting Tomcat in native
mode. The max. memory-consuption I was expecting (in case MaxpermSize
is allocated completely would be some 896M. Btw., when giving Tomcat
1024m as Xms  Xmx, memory-footprint is around 1.6GB...

Anybody has an idea what I might be missing here?

TIA

Gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Strange memory-behaviour using Tomcat Native

2010-04-08 Thread Mark Thomas
On 08/04/2010 12:12, Gregor Schneider wrote:
 Anybody has an idea what I might be missing here?

That Java Heap Space + Perm Gen Space  OS process Space

You are missing the memory used for:
- native code
- gc
- thread stacks

to name a few.

Mark



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Strange memory-behaviour using Tomcat Native

2010-04-08 Thread Gregor Schneider
Hi Mark,

On Thu, Apr 8, 2010 at 1:48 PM, Mark Thomas ma...@apache.org wrote:
 On 08/04/2010 12:12, Gregor Schneider wrote:
 Anybody has an idea what I might be missing here?

 That Java Heap Space + Perm Gen Space  OS process Space

 You are missing the memory used for:
 - native code
 - gc
 - thread stacks


I'd agree to that, however, somehow it suprises me that almost 1/2 a
GB is used for native, gc, threads  stuff - wasn't aware that it is
that much, specifically, that the memory-usage of said components
seems to be increasing even further when enhancing Xmx / Xmx.

Example:

When using Xms/Xmx = 512M, MaxpermSize=384M, then the overall
footprint is a bit less than 1GB

When using Xmx/Xmx=1GB, MaxpermSize=384M, the overall footprint is 1.6GB.

That means, for those administrative stuff in the first example less
than 100M is used, but in the 2nd example it's more than double the
size - is such a common behaviour?

Rgds

Gregor
-- 
just because you're paranoid, don't mean they're not after you...
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available
@ http://pgpkeys.pca.dfn.de:11371
@ http://pgp.mit.edu:11371/
skype:rc46fi

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Strange memory-behaviour using Tomcat Native

2010-04-08 Thread Caldarale, Charles R
 From: Gregor Schneider [mailto:rc4...@googlemail.com]
 Subject: Re: Strange memory-behaviour using Tomcat Native
 
 That means, for those administrative stuff in the first example less
 than 100M is used, but in the 2nd example it's more than double the
 size - is such a common behaviour?

The virtual memory numbers you're looking at are all funny money - just space 
that's reserved, not necessarily being used.  What the OS chooses to allocate 
for each thread (along with what the JVM grabs) is not readily controllable, 
and that has to be added to space for the code, C heap, file mappings, etc., 
that Mark already referred to.  There's really not any point in worrying about 
this.

 - 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.