> From: André Warnier [mailto:[EMAIL PROTECTED]
> Subject: Re: Tomcat threads, II
>
> What I would like to know now, is how I interpret these numbers.

Will take a look at the actual numbers in a bit.

> Is there somewhere a tutorial giving some pointers as to what I am
> looking at ?

This is a link to some Sun papers on the subject:
http://java.sun.com/javase/technologies/hotspot/gc/index.jsp

> is there somewhere I could find a description of terms used
> below, such as "Eden", "New Generation", "Perm Generation" etc.. ?

Strictly speacking, PermGen is not part of the heap, but is an additional area 
used to hold instances of java.lang.Class - one instance for every loaded class 
from both the JRE and the running application.

The actual Java heap is broken up into sections during initialization, although 
the boundaries can move as needed.  The Eden space is the area where nearly all 
objects are "born"; as a thread executes it acquires a large chunk of Eden 
space for its personal use, and allocations are done within that area (known as 
a Thread Local Allocation Buffer) until full, and then another is required.  
Using the TLAB allows allocations to occur without any locking.  When all of 
the Eden space is consumed, a minor GC is triggered.

The pair of Survivor spaces hold most of the objects that are still active 
after a minor GC.  (The combination of Eden and Survivor spaces is known as New 
Generation.)  Most objects have very short lifetimes; a minor GC moves the ones 
that are referenceable from Eden and the "from" Survivor space into the "to" 
Survivor space (which then becomes the "from").

Some objects will persist for a very long time, so after living for some time 
in a Survivor space, they're moved into the Tenured space (aka Old Generation), 
but only during what's called a full or major GC.

If you use JConsole or JVisualVM to look at a running application, you can see 
a vivid graphical representation of the goings-on in each portion of the heap.  
JConsole is probably easier to interpret initially (note that the boxes on the 
lower right of the Memory tab are clickable), while JVisualVM provides a more 
complete albeit somewhat more confusing view of the heap state.

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

Reply via email to