Usually the term heap is used for the sum of the new space, one of the two semi spaces (both usually around a couple of MB) and tenured. The size of each of these can be viewed e.g. with jconsole, which comes with your JVM.
Additional memory is used for perm (class data), which should generally be in the reange of 10-60MB, depending on how many classes you have. Further memory is needed for thread stacks, native libs and in Java 1.5 for class sharing meta data. You can have a look at the native side of things by the Solaris command pmap. On Solaris you should not use top. Use prstat instead. Does the gap stabilize after some time? Regards, Rainer xu cai schrieb: > hi Steffen, > > thanks for ur reply. I still have questions on that, see that in-line. > > On 11/21/06, Steffen Heil <[EMAIL PROTECTED]> wrote: >> >> Hi >> >> > Description : >> > right after system(tomcat) is started, the "top" command show >> > that tomcat process will use 210M memory, the heap size >> > (using Jprofiler) is 58m/20m(total/used). there is a 150M gap >> > between total process memory size and java heap size. >> >> There needs to be some memory for the JVM as well as your classes. >> Furthermore GCs may keep two copies of the youngest generation part of >> the >> heap. > > > Yes, some memory is needed for JVM and classes, also GC keep copies of > young > generation part of heap. > > Since the heap memory is managed well by GC, used heap memory grows from > 20M > to 160M gracefully and come back to 20M. > But my question is why the total memory size of the process (tomcat) grows > up from 230M to more than 520M. there is no significant memory grow in > java > heap, why the total memory can grow up almost 300M ? > >> So my questions are: >> > 1, what is the difference between java process memory size >> > and java heap size ? why can it be 150M in right after tomcat >> > is started ? >> > 2, why the gap between top can heap can grows from 150M to >> > 320M, where does 170M more memory gone ? >> >> I assume it was needed in between. >> However, memory allocated by the JVM not not neccessarily lost. Not being >> used that may be swapped out. >> >> Regards, >> Steffen >> >> >> > > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]