You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Andrew Hole <an...@gmail.com> on 2009/04/08 15:53:25 UTC

tomcat process memory

Hi guys!

I'm getting a strange behaviour of Tomcat process.
I'm using a memory profiler and it shows the following info:
heap allocated memory: 278MB
non-heap allocated memory : 151MB

However, TOP shows that memory used by tomcat process is more or less 1GB.

WhY this happens? Is it possible to understant what is using the remaining
MB?

Thanks a lot

RE: tomcat process memory

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Andrew Hole [mailto:andremailinglist@gmail.com]
> Subject: tomcat process memory
> 
> WhY this happens? Is it possible to understant what is using the
> remaining MB?

That 1 GB is the virtual space allocated to the process, so it includes not only the Java heap, but also code, the C heap, OS structures, library structures, file buffers, and myriad other bits and pieces needed to actually run a program.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat process memory

Posted by Nikola Bozadziev <ni...@bozadziev.net>.
Dear Andrew,
have a look at http://www.lambdaprobe.org/d/index.htm, it helped us by
memory problems a lot.

Best regards,
Nikola

Re: tomcat process memory

Posted by Rainer Jung <ra...@kippdata.de>.
On 08.04.2009 16:25, Andrew Hole wrote:
> I'm using Your Kit Java Profiler:
> 
> 
>   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+
> COMMAND
> 32121 tomcat    25   0 1649m 962m  15m S   76 24.3  23:00.14 java
> 
> At this moment I've 501 heap allocated memory and 146 non-heap.
> The total memory     used by the process is increasing and has the value of
> 962MB.

You might also want to look at the file

/proc/32121/maps

or more generally

/proc/MYPID/maps

There you can do a little exercise with hex address difference
calculations to find out how much native memory is used (roughly) for what.

Regards,

Rainer

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


RE: tomcat process memory

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Andrew Hole [mailto:andremailinglist@gmail.com]
> Subject: Re: tomcat process memory
> 
> At this moment I've 501 heap allocated memory and 146 non-heap.

If you're using a HotSpot JVM (again, you didn't tell us) with YourKit, heap memory is the space consumed by allocations in the young and old generations, and non-heap is JIT-generated code and permanent generation.  The exact components of the non-heap space also vary depending on whether class sharing is on or not (on by default in client mode, not available in server mode).

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat process memory

Posted by Andrew Hole <an...@gmail.com>.
I'm using Your Kit Java Profiler:


  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+
COMMAND
32121 tomcat    25   0 1649m 962m  15m S   76 24.3  23:00.14 java

At this moment I've 501 heap allocated memory and 146 non-heap.
The total memory     used by the process is increasing and has the value of
962MB.



On Wed, Apr 8, 2009 at 3:13 PM, Caldarale, Charles R <
Chuck.Caldarale@unisys.com> wrote:

> > From: Andrew Hole [mailto:andremailinglist@gmail.com]
> > Subject: Re: tomcat process memory
> >
> > What is the difference between heap and non-heap and where I can
> > configure the limit to non-heap?
>
> The terminology depends on the profiling tool you're using - one of the
> many pertinent things you didn't bother to tell us.
>
>  - 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

RE: tomcat process memory

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: Andrew Hole [mailto:andremailinglist@gmail.com]
> Subject: Re: tomcat process memory
> 
> What is the difference between heap and non-heap and where I can
> configure the limit to non-heap?

The terminology depends on the profiling tool you're using - one of the many pertinent things you didn't bother to tell us.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat process memory

Posted by Andrew Hole <an...@gmail.com>.
Linux. RES column.

What is the difference between heap and non-heap and where I can configure
the limit to non-heap?

Thanks

On Wed, Apr 8, 2009 at 2:58 PM, André Warnier <aw...@ice-sa.com> wrote:

> Andrew Hole wrote:
>
>> Hi guys!
>>
>> I'm getting a strange behaviour of Tomcat process.
>> I'm using a memory profiler and it shows the following info:
>> heap allocated memory: 278MB
>> non-heap allocated memory : 151MB
>>
>> However, TOP shows that memory used by tomcat process is more or less 1GB.
>>
>
> What column of top is telling you that, on which platform and with which
> Tomcat ?
>
>
>> WhY this happens? Is it possible to understant what is using the remaining
>> MB?
>>
>
> Probably difficult at the best of time without a lot more information, but
> start with the above.
>
> By the way, a good document of which I just heard of today is here :
> http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Re: tomcat process memory

Posted by André Warnier <aw...@ice-sa.com>.
Andrew Hole wrote:
> Hi guys!
> 
> I'm getting a strange behaviour of Tomcat process.
> I'm using a memory profiler and it shows the following info:
> heap allocated memory: 278MB
> non-heap allocated memory : 151MB
> 
> However, TOP shows that memory used by tomcat process is more or less 1GB.

What column of top is telling you that, on which platform and with which 
Tomcat ?

> 
> WhY this happens? Is it possible to understant what is using the remaining
> MB?

Probably difficult at the best of time without a lot more information, 
but start with the above.

By the way, a good document of which I just heard of today is here :
http://java.sun.com/javase/technologies/hotspot/gc/gc_tuning_6.html

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