You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by xu cai <je...@gmail.com> on 2006/11/21 09:22:09 UTC

tomcat memory usage.

Env: Axis1.4/Tomcat 5.0.30/Java 1.5.0_07/Solaris 10.

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.

I run a client to invoke the web service in a loop, couple houres later,
tomcat process memory size can grow to 510M, the heap size of is 190m/20m
(total/used). so the gap between process memory size and java heap size
grows to 320M.  From gc log, I didn't any thing weired since the used heap
size can keep at 20m, no memory leak can be found at jprofiler.

 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 ?


does anybody have simliar experience using axis/tomcat ? I need help

thanks
xucai

Client side code example:
*// get a port from client stub . ignored. *
* while (true) {
         try {
                 long start=System.currentTimeMillis();
                 for ( int i=0; i<1000; i++) {
                          String reply= port.request(command);  // web
service call
                          System.out.print(".");
                  }
                  long end=System.currentTimeMillis();
                  long used= (end-start)/1000;
                  System.out.println();
                  System.out.println("Time used: "+used);
          } catch(Exception e) {
                  e.printStackTrace();
          }
} *


-- 
- xucai

Re: tomcat memory usage.

Posted by xu cai <je...@gmail.com>.
Rainer Jung,

thanks for ur reply.  I understand that JVM will use lots of memory besides
heap.

but I didn't see that the gap between the "heap" size and total memory size
can be stable.
it keeps on growing.

I list the pmap result below. there are lots of unknow memory allocated. Is
there any tool can list all memory allocated by jvm ?

4818: /usr/java/bin/java -Xmx512m -D_TOMCAT -server -Djava.endorsed.dirs=/op
00010000      64K r-x--  /opt/jdk1.5.0_07/bin/java
0002E000      16K rwx--  /opt/jdk1.5.0_07/bin/java
00032000   33808K rwx--    [ heap ]
C82F8000      32K rw--R    [ anon ]
C83F8000      32K rw--R    [ anon ]
C84F8000      32K rw--R    [ anon ]
C85F8000      32K rw--R    [ anon ]
C86F8000      32K rw--R    [ anon ]
C87F8000      32K rw--R    [ anon ]
C88F8000      32K rw--R    [ anon ]
C89F8000      32K rw--R    [ anon ]
C8AF8000      32K rw--R    [ anon ]
C8BF8000      32K rw--R    [ anon ]
C8CF6000      40K rw--R    [ anon ]
C8DF8000      32K rw--R    [ anon ]
C8EF8000      32K rw--R    [ anon ]
C8FF8000      32K rw--R    [ anon ]
C90F8000      32K rw--R    [ anon ]
C91F8000      32K rw--R    [ anon ]
C92F6000      40K rw--R    [ anon ]
C93F6000      40K rw--R    [ anon ]
C94F6000      40K rw--R    [ anon ]
C95F6000      40K rw--R    [ anon ]
C96F8000      32K rw--R    [ anon ]
C97F8000      32K rw--R    [ anon ]
C98F8000      32K rw--R    [ anon ]
C99F8000      32K rw--R    [ anon ]
C9AF6000      40K rw--R    [ anon ]
C9BF6000      40K rw--R    [ anon ]
C9CF6000      40K rw--R    [ anon ]
C9DF6000      40K rw--R    [ anon ]
C9EF8000      32K rw--R    [ anon ]
C9FF8000      32K rw--R    [ anon ]
CA0F8000      32K rw--R    [ anon ]
CA1F8000      32K rw--R    [ anon ]
CA2F8000      32K rw--R    [ anon ]
CA3F8000      32K rw--R    [ anon ]
CA4F8000      32K rw--R    [ anon ]
CA5F8000      32K rw--R    [ anon ]
CA6F8000      32K rw--R    [ anon ]
CA7F8000      32K rw--R    [ anon ]
CA8F8000      32K rw--R    [ anon ]
CA9F8000      32K rw--R    [ anon ]
CAAF8000      32K rw--R    [ anon ]
CABF8000      32K rw--R    [ anon ]
CACF8000      32K rw--R    [ anon ]
CADF8000      32K rw--R    [ anon ]
CAEF8000      32K rw--R    [ anon ]
CAFF8000      32K rw--R    [ anon ]
CB0F8000      32K rw--R    [ anon ]
CB1F8000      32K rw--R    [ anon ]
CB2F8000      32K rw--R    [ anon ]
CB3F8000      32K rw--R    [ anon ]
CB4F8000      32K rw--R    [ anon ]
CB5F8000      32K rw--R    [ anon ]
CB6F8000      32K rw--R    [ anon ]
CB7F8000      32K rw--R    [ anon ]
CB8F8000      32K rw--R    [ anon ]
CB9F8000      32K rw--R    [ anon ]
CBAF8000      32K rw--R    [ anon ]
CBBF8000      32K rw--R    [ anon ]
CBCF8000      32K rw--R    [ anon ]
CBDF8000      32K rw--R    [ anon ]
CBEF8000      32K rw--R    [ anon ]
CBFF8000      32K rw--R    [ anon ]
CC0F8000      32K rw--R    [ anon ]
CC1F8000      32K rw--R    [ anon ]
CC2F8000      32K rw--R    [ anon ]
CC3F8000      32K rw--R    [ anon ]
CC4F8000      32K rw--R    [ anon ]
CC5F8000      32K rw--R    [ anon ]
CC6F8000      32K rw--R    [ anon ]
CC7F8000      32K rw--R    [ anon ]
CC8F8000      32K rw--R    [ anon ]
CC9F8000      32K rw--R    [ anon ]
CCAF8000      32K rw--R    [ anon ]
CCBF8000      32K rw--R    [ anon ]
CCCF8000      32K rw--R    [ anon ]
CCDF8000      32K rw--R    [ anon ]
CCEF8000      32K rw--R    [ anon ]
CCFF8000      32K rw--R    [ anon ]
CD0F8000      32K rw--R    [ anon ]
CD1F8000      32K rw--R    [ anon ]
CD2F8000      32K rw--R    [ anon ]
CD3F8000      32K rw--R    [ anon ]
CD4F8000      32K rw--R    [ anon ]
CD5F8000      32K rw--R    [ anon ]
CD6F8000      32K rw--R    [ anon ]
CD7F8000      32K rw--R    [ anon ]
CD8F8000      32K rw--R    [ anon ]
CD9F8000      32K rw--R    [ anon ]
CDAF8000      32K rw--R    [ anon ]
CDBF8000      32K rw--R    [ anon ]
CDCF8000      32K rw--R    [ anon ]
CDDF8000      32K rw--R    [ anon ]
CDEF8000      32K rw--R    [ anon ]
CDFF8000      32K rw--R    [ anon ]
CE0F8000      32K rw--R    [ anon ]
CE1F8000      32K rw--R    [ anon ]
CE2F8000      32K rw--R    [ anon ]
CE3F8000      32K rw--R    [ anon ]
CE4F8000      32K rw--R    [ anon ]
CE5F8000      32K rw--R    [ anon ]
CE6F8000      32K rw--R    [ anon ]
CE7F8000      32K rw--R    [ anon ]
CE8F8000      32K rw--R    [ anon ]
CE9F8000      32K rw--R    [ anon ]
CEAF8000      32K rw--R    [ anon ]
CEBF8000      32K rw--R    [ anon ]
CECF8000      32K rw--R    [ anon ]
CEDF8000      32K rw--R    [ anon ]
CEEF8000      32K rw--R    [ anon ]
CF1F4000      48K rw--R    [ anon ]
CF2F4000      48K rw--R    [ anon ]
CF3F4000      48K rw--R    [ anon ]
CF4F6000      40K rw--R    [ anon ]
CF5F6000      40K rw--R    [ anon ]
CF6F6000      40K rw--R    [ anon ]
CF7F6000      40K rw--R    [ anon ]
CF8F6000      40K rw--R    [ anon ]
CF9F6000      40K rw--R    [ anon ]
CFAF6000      40K rw--R    [ anon ]
CFBF6000      40K rw--R    [ anon ]
CFCF6000      40K rw--R    [ anon ]
CFDF6000      40K rw--R    [ anon ]
CFEF6000      40K rw--R    [ anon ]
CFFF6000      40K rw--R    [ anon ]
D00F6000      40K rw--R    [ anon ]
D01F6000      40K rw--R    [ anon ]
D02F6000      40K rw--R    [ anon ]
D03F6000      40K rw--R    [ anon ]
D04F6000      40K rw--R    [ anon ]
D05F6000      40K rw--R    [ anon ]
D06F6000      40K rw--R    [ anon ]
D07F6000      40K rw--R    [ anon ]
D08F6000      40K rw--R    [ anon ]
D09F6000      40K rw--R    [ anon ]
D0AF4000      48K rw--R    [ anon ]
D0BF2000      56K rw--R    [ anon ]
D0CF6000      40K rw--R    [ anon ]
D0DF6000      40K rw--R    [ anon ]
D0EF6000      40K rw--R    [ anon ]
D0FF6000      40K rw--R    [ anon ]
D10F4000      48K rw--R    [ anon ]
D11F6000      40K rw--R    [ anon ]
D12F6000      40K rw--R    [ anon ]
D13F6000      40K rw--R    [ anon ]
D14F6000      40K rw--R    [ anon ]
D15F4000      48K rw--R    [ anon ]
D16F4000      48K rw--R    [ anon ]
D17F4000      48K rw--R    [ anon ]
D18F4000      48K rw--R    [ anon ]
D19F4000      48K rw--R    [ anon ]
D1AF6000      40K rw--R    [ anon ]
D1BF4000      48K rw--R    [ anon ]
D1CF4000      48K rw--R    [ anon ]
D1DEE000      72K rw--R    [ anon ]
D1EF6000      40K rw--R    [ anon ]
D1FF6000      40K rw--R    [ anon ]
D20F6000      40K rw--R    [ anon ]
D21F8000      32K rw--R    [ anon ]
D22F2000      56K rw--R    [ anon ]
D23F8000      32K rw--R    [ anon ]
D24F6000      40K rw--R    [ anon ]
D25F4000      48K rw--R    [ anon ]
D26F4000      48K rw--R    [ anon ]
D27F8000      32K rw--R    [ anon ]
D28EE000      72K rw--R    [ anon ]
D29F8000      32K rw--R    [ anon ]
D2AF6000      40K rw--R    [ anon ]
D2BF6000      40K rw--R    [ anon ]
D2CF8000      32K rw--R    [ anon ]
D2DF8000      32K rw--R    [ anon ]
D2EF6000      40K rw--R    [ anon ]
D2FF8000      32K rw--R    [ anon ]
D3060000      64K rwx--    [ anon ]
D3080000     696K r--s-  dev:32,5 ino:56285
D3140000      64K rwx--    [ anon ]
D3160000      24K r-x--  /lib/nss_files.so.1
D3176000       8K rwx--  /lib/nss_files.so.1
D3180000     552K r--s-  dev:32,5 ino:56261
D3280000     984K r--s-  dev:32,5 ino:56260
D3380000    1448K r--s-  dev:32,5 ino:56042
D3500000    1384K r--s-  dev:32,5 ino:102831
D3660000      64K rwx--    [ anon ]
D3680000    1176K r--s-  dev:32,5 ino:42838
D37E0000       8K r-x--  /lib/libkstat.so.1
D37F2000       8K rwx--  /lib/libkstat.so.1
D3800000    6872K r--s-  dev:32,5 ino:32792
D3ED0000      32K r-x--  /opt/BTSutil/lib/libunic.so
D3EE6000       8K rwx--  /opt/BTSutil/lib/libunic.so
D3EF0000       8K rwx--    [ anon ]
D3F00000     784K r--s-  dev:32,5 ino:62176
D3FD0000      72K r-x--  /opt/jdk1.5.0_07/jre/lib/sparc/libnet.so
D3FF0000       8K rwx--  /opt/jdk1.5.0_07/jre/lib/sparc/libnet.so
D4000000     784K r--s-  dev:32,5 ino:32191
D417E000       8K rw--R    [ anon ]
D41D0000     128K rwx--    [ anon ]
D427E000       8K rw--R    [ anon ]
D42A0000     288K r-x--  /usr/lib/security/pkcs11_softtoken.so.1
D42F8000      16K rwx--  /usr/lib/security/pkcs11_softtoken.so.1
D4376000       8K rw--R    [ anon ]
D437C000      16K rw--R    [ anon ]
D4390000      24K r-x--  /usr/lib/libcryptoutil.so.1
D43A6000       8K rwx--  /usr/lib/libcryptoutil.so.1
D43B0000      40K r-x--  /usr/lib/libpkcs11.so.1
D43CA000       8K rwx--  /usr/lib/libpkcs11.so.1
D43D0000      56K r-x--  /opt/jdk1.5.0_07/jre/lib/sparc/libj2pkcs11.so
D43EC000       8K rwx--  /opt/jdk1.5.0_07/jre/lib/sparc/libj2pkcs11.so
D4400000   16384K rwx--    [ anon ]
D5400000    4096K rwx--    [ anon ]
D8400000    4096K rwx--    [ anon ]
D8800000    4096K rwx--    [ anon ]
D8C00000    4096K rwx--    [ anon ]
D9000000    4096K rwx--    [ anon ]
D9400000    4096K rwx--    [ anon ]
D9800000   12288K rwx--    [ anon ]
DA400000   16384K rwx--    [ anon ]
DB400000    4096K rwx--    [ anon ]
DB800000   20480K rwx--    [ anon ]
DCC00000    8192K rwx--    [ anon ]
DD400000    8192K rwx--    [ anon ]
DDC00000    4096K rwx--    [ anon ]
DE000000    4096K rwx--    [ anon ]
DE400000    4096K rwx--    [ anon ]
DE800000    8192K rwx--    [ anon ]
DF000000    8192K rwx--    [ anon ]
DF800000   12288K rwx--    [ anon ]
E0400000    4096K rwx--    [ anon ]
E0800000    8192K rwx--    [ anon ]
E1000000    8192K rwx--    [ anon ]
E1800000   12288K rwx--    [ anon ]
E2400000   16384K rwx--    [ anon ]
E3400000    4096K rwx--    [ anon ]
E3800000   16384K rwx--    [ anon ]
E4800000   16384K rwx--    [ anon ]
E5800000    8192K rwx--    [ anon ]
E6000000   12288K rwx--    [ anon ]
E6C00000    4096K rwx--    [ anon ]
E7000000    4096K rwx--    [ anon ]
E7400000    8192K rwx--    [ anon ]
E7C00000    8192K rwx--    [ anon ]
E8400000   20480K rwx--    [ anon ]
E9800000   16384K rwx--    [ anon ]
EA800000   12288K rwx--    [ anon ]
EB400000    4096K rwx--    [ anon ]
EB800000    8192K rwx--    [ anon ]
EC000000    8192K rwx--    [ anon ]
EC800000   16384K rwx--    [ anon ]
ED800000    4096K rwx--    [ anon ]
EDC00000    4096K rwx--    [ anon ]
EE000000    4096K rwx--    [ anon ]
EE400000    8192K rwx--    [ anon ]
EEC00000    4096K rwx--    [ anon ]
EF000000   12288K rwx--    [ anon ]
EFC00000   20480K rwx--    [ anon ]
F1000000    4096K rwx--    [ anon ]
F1400000   28672K rwx--    [ anon ]
F3000000   12288K rwx--    [ anon ]
F3C00000   28672K rwx--    [ anon ]
F5800000    4096K rwx--    [ anon ]
F5C00000   16384K rwx--    [ anon ]
F6C00000    4096K rwx--    [ anon ]
F7000000   16384K rwx--    [ anon ]
F8000000    8192K rwx--    [ anon ]
F8820000     184K r--s-  dev:32,5 ino:56306
F8860000      16K r--s-  dev:32,5 ino:56305
F8870000     120K r--s-  dev:32,5 ino:56304
F88A0000       8K r--s-  dev:32,5 ino:56303
F88B0000      56K r--s-  dev:32,5 ino:56302
F88D0000      24K r--s-  dev:32,5 ino:56301
F88E0000      24K r--s-  dev:32,5 ino:56300
F88F0000       8K r--s-  dev:32,5 ino:56298
F8976000       8K rw--R    [ anon ]
F897A000      24K rw--R    [ anon ]
F8990000      24K r--s-  dev:32,5 ino:56297
F89A0000       8K r--s-  dev:32,5 ino:56296
F89B0000       8K r--s-  dev:32,5 ino:56294
F89C0000      32K r--s-  dev:32,5 ino:56293
F89D0000      32K r--s-  dev:32,5 ino:56292
F89E0000     112K r--s-  dev:32,5 ino:56291
F8A7E000       8K rw--R    [ anon ]
F8A90000      24K r--s-  dev:32,5 ino:56290
F8AA0000     112K r--s-  dev:32,5 ino:56287
F8AC0000     192K r--s-  dev:32,5 ino:56286
F8B7E000       8K rw--R    [ anon ]
F8B90000     112K r--s-  dev:32,5 ino:56284
F8BB0000      24K r--s-  dev:32,5 ino:56283
F8BC0000      24K r--s-  dev:32,5 ino:56282
F8BD0000     128K r--s-  dev:32,5 ino:56280
F8C00000    4096K rwx--    [ anon ]
F9000000    4096K rwx--    [ anon ]
F9400000    4096K rwx--    [ anon ]
FAC10000      24K r--s-  dev:32,5 ino:56281
FAC20000      24K r--s-  dev:32,5 ino:56279
FAC30000     352K r--s-  dev:32,5 ino:56274
FAC90000      40K r--s-  dev:32,5 ino:56273
FACA0000      96K r--s-  dev:32,5 ino:56272
FACC0000      48K r--s-  dev:32,5 ino:56271
FACD0000       8K r--s-  dev:32,5 ino:56270
FACE0000      56K r--s-  dev:32,5 ino:56267
FAD78000      32K rw--R    [ anon ]
FAD90000      16K r--s-  dev:32,5 ino:56269
FADA0000     352K r--s-  dev:32,5 ino:56265
FAE78000      32K rw--R    [ anon ]
FAE90000     112K r--s-  dev:32,5 ino:56266
FAEB0000      48K r--s-  dev:32,5 ino:56264
FAEC0000     112K r--s-  dev:32,5 ino:56263
FAEE0000     112K r--s-  dev:32,5 ino:56262
FAF7E000       8K rw--R    [ anon ]
FAF90000      32K r--s-  dev:32,5 ino:56268
FAFA0000     336K r--s-  dev:32,5 ino:56224
FB000000    8632K r--s-  dev:32,5 ino:24857
FB880000      16K r--s-  dev:32,5 ino:56259
FB890000      32K r--s-  dev:32,5 ino:56217
FB8A0000      32K r--s-  dev:32,5 ino:56184
FB8B0000      48K r--s-  dev:32,5 ino:54460
FB8C0000      16K r--s-  dev:32,5 ino:54459
FB8D0000      40K r--s-  dev:32,5 ino:62059
FB8E0000      56K r--s-  dev:32,5 ino:54466
FB97E000       8K rw--R    [ anon ]
FB990000     384K r--s-  dev:32,5 ino:42526
FBA7E000       8K rw--R    [ anon ]
FBA90000     120K r--s-  dev:32,5 ino:42868
FBAC0000     192K r--s-  dev:32,5 ino:42839
FBB00000       8K rwx--    [ anon ]
FBB02000       8K rwx--    [ anon ]
FBB04000       8K rwx--    [ anon ]
FBB06000       8K rwx--    [ anon ]
FBB08000       8K rwx--    [ anon ]
FBB0A000      24K rwx--    [ anon ]
FBB10000      32K rwx--    [ anon ]
FBB18000       8K rwx--    [ anon ]
FBB1A000      40K rwx--    [ anon ]
FBB24000      16K rwx--    [ anon ]
FBB28000      16K rwx--    [ anon ]
FBB2C000       8K rwx--    [ anon ]
FBB2E000       8K rwx--    [ anon ]
FBB30000       8K rwx--    [ anon ]
FBB32000      16K rwx--    [ anon ]
FBB36000      16K rwx--    [ anon ]
FBB3A000      24K rwx--    [ anon ]
FBB40000       8K rwx--    [ anon ]
FBB42000      16K rwx--    [ anon ]
FBB46000      16K rwx--    [ anon ]
FBB4A000      24K rwx--    [ anon ]
FBB50000      32K rwx--    [ anon ]
FBB58000       8K rwx--    [ anon ]
FBB5A000      32K rwx--    [ anon ]
FBB62000      32K rwx--    [ anon ]
FBB6A000      16K rwx--    [ anon ]
FBB6E000      24K rwx--    [ anon ]
FBB74000       8K rwx--    [ anon ]
FBB76000       8K rwx--    [ anon ]
FBB78000      16K rwx--    [ anon ]
FBB7C000      16K rwx--    [ anon ]
FBB80000      40K rwx--    [ anon ]
FBB8A000      32K rwx--    [ anon ]
FBB92000      24K rwx--    [ anon ]
FBB98000       8K rwx--    [ anon ]
FBB9A000      16K rwx--    [ anon ]
FBB9E000      16K rwx--    [ anon ]
FBBA2000      32K rwx--    [ anon ]
FBBAA000       8K rwx--    [ anon ]
FBBC0000     232K r--s-  dev:32,5 ino:54498
FBC00000   38944K r--s-  dev:32,5 ino:24856
FE210000     120K r--s-  dev:32,5 ino:42863
FE240000      32K r--s-  dev:32,5 ino:42840
FE250000     168K r--s-  dev:32,5 ino:42843
FE280000      32K rwx--    [ anon ]
FE288000       8K rwx--    [ anon ]
FE2A0000       8K rwx--    [ anon ]
FE2A2000       8K rwx--    [ anon ]
FE2A4000       8K rwx--    [ anon ]
FE2A6000       8K rwx--    [ anon ]
FE2A8000       8K rwx--    [ anon ]
FE2AA000      24K rwx--    [ anon ]
FE2B0000      32K rwx--    [ anon ]
FE2B8000       8K rwx--    [ anon ]
FE2BA000      40K rwx--    [ anon ]
FE2C4000      16K rwx--    [ anon ]
FE2C8000      16K rwx--    [ anon ]
FE2CC000       8K rwx--    [ anon ]
FE2CE000       8K rwx--    [ anon ]
FE2D0000       8K rwx--    [ anon ]
FE2D2000      16K rwx--    [ anon ]
FE2D6000      16K rwx--    [ anon ]
FE2DA000      24K rwx--    [ anon ]
FE2E0000       8K rwx--    [ anon ]
FE2E2000      16K rwx--    [ anon ]
FE2E6000      16K rwx--    [ anon ]
FE2EA000      24K rwx--    [ anon ]
FE2F0000      32K rwx--    [ anon ]
FE2F8000       8K rwx--    [ anon ]
FE2FA000      32K rwx--    [ anon ]
FE302000      32K rwx--    [ anon ]
FE30A000      16K rwx--    [ anon ]
FE30E000      24K rwx--    [ anon ]
FE314000       8K rwx--    [ anon ]
FE316000       8K rwx--    [ anon ]
FE318000      16K rwx--    [ anon ]
FE31C000      16K rwx--    [ anon ]
FE320000      40K rwx--    [ anon ]
FE32A000      32K rwx--    [ anon ]
FE332000      24K rwx--    [ anon ]
FE338000       8K rwx--    [ anon ]
FE33A000      16K rwx--    [ anon ]
FE33E000      16K rwx--    [ anon ]
FE342000      32K rwx--    [ anon ]
FE34A000       8K rwx--    [ anon ]
FE34C000       8K rwx--    [ anon ]
FE34E000       8K rwx--    [ anon ]
FE350000      16K rwx--    [ anon ]
FE354000       8K rwx--    [ anon ]
FE356000      24K rwx--    [ anon ]
FE35C000      40K rwx--    [ anon ]
FE366000       8K rwx--    [ anon ]
FE368000      56K rwx--    [ anon ]
FE376000      24K rwx--    [ anon ]
FE37C000      56K rwx--    [ anon ]
FE38A000       8K rwx--    [ anon ]
FE38C000      32K rwx--    [ anon ]
FE394000       8K rwx--    [ anon ]
FE396000      32K rwx--    [ anon ]
FE39E000      16K rwx--    [ anon ]
FE3A2000       8K rwx--    [ anon ]
FE3B0000      16K r--s-  dev:32,5 ino:56215
FE3C0000       8K r--s-  dev:32,5 ino:32190
FE3D0000     176K r--s-  dev:32,5 ino:32180
FE400000      24K rwx--    [ anon ]
FE406000       8K rwx--    [ anon ]
FE408000       8K rwx--    [ anon ]
FE40A000       8K rwx--    [ anon ]
FE40C000       8K rwx--    [ anon ]
FE40E000       8K rwx--    [ anon ]
FE410000       8K rwx--    [ anon ]
FE412000       8K rwx--    [ anon ]
FE414000       8K rwx--    [ anon ]
FE416000       8K rwx--    [ anon ]
FE418000       8K rwx--    [ anon ]
FE41A000       8K rwx--    [ anon ]
FE41C000       8K rwx--    [ anon ]
FE41E000       8K rwx--    [ anon ]
FE420000       8K rwx--    [ anon ]
FE490000     160K r--s-  dev:32,5 ino:32179
FE4C0000      64K rwx--    [ anon ]
FE4E0000      64K rw---    [ anon ]
FE500000     536K r--s-  dev:32,5 ino:24855
FE590000      64K rw---    [ anon ]
FE5B0000      32K rwx--    [ anon ]
FE5B8000       8K rwx--    [ anon ]
FE5E0000      88K r--s-  dev:32,5 ino:24841
FE600000       8K rwx--    [ anon ]
FE610000      64K r-x--  /opt/jdk1.5.0_07/jre/lib/sparc/libzip.so
FE620000       8K rwx--  /opt/jdk1.5.0_07/jre/lib/sparc/libzip.so
FE630000     144K r-x--  /opt/jdk1.5.0_07/jre/lib/sparc/libjava.so
FE664000       8K rwx--  /opt/jdk1.5.0_07/jre/lib/sparc/libjava.so
FE670000      56K r-x--  /opt/jdk1.5.0_07/jre/lib/sparc/libverify.so
FE68E000       8K rwx--  /opt/jdk1.5.0_07/jre/lib/sparc/libverify.so
FE6A0000      40K r--s-  dev:32,5 ino:49255
FE6B0000       8K rwxs-    [ anon ]
FE6C0000      32K rw-s-  dev:274,2 ino:1016152149
FE6D0000      32K r-x--
/opt/jdk1.5.0_07/jre/lib/sparc/native_threads/libhpi.so
FE6E8000       8K rwx--
/opt/jdk1.5.0_07/jre/lib/sparc/native_threads/libhpi.so
FE6EA000       8K rwx--
/opt/jdk1.5.0_07/jre/lib/sparc/native_threads/libhpi.so
FE700000     680K r-x--  /lib/libm.so.2
FE7B8000      32K rwx--  /lib/libm.so.2
FE7D0000       8K rwx--    [ anon ]
FE7E0000      16K r-x--  /lib/libmp.so.2
FE7F4000       8K rwx--  /lib/libmp.so.2
FE800000    7888K r-x--  /opt/jdk1.5.0_07/jre/lib/sparc/server/libjvm.so
FEFC4000     400K rwx--  /opt/jdk1.5.0_07/jre/lib/sparc/server/libjvm.so
FF028000      64K rwx--  /opt/jdk1.5.0_07/jre/lib/sparc/server/libjvm.so
FF040000       8K rwx--    [ anon ]
FF050000       8K r-x--  /platform/sun4u/lib/libmd5_psr.so.1
FF062000       8K rwx--  /platform/sun4u/lib/libmd5_psr.so.1
FF070000       8K r-x--  /lib/libmd5.so.1
FF082000       8K rwx--  /lib/libmd5.so.1
FF090000      32K r-x--  /lib/libuutil.so.1
FF0A8000       8K rwx--  /lib/libuutil.so.1
FF0B0000       8K r-x--  /lib/libdoor.so.1
FF0C2000       8K rwx--  /lib/libdoor.so.1
FF0D0000      96K r-x--  /lib/libscf.so.1
FF0F8000       8K rwx--  /lib/libscf.so.1
FF100000     584K r-x--  /lib/libnsl.so.1
FF1A2000      40K rwx--  /lib/libnsl.so.1
FF1AC000      24K rwx--  /lib/libnsl.so.1
FF1C0000       8K rwx--    [ anon ]
FF1D0000      16K r-x--  /lib/libm.so.1
FF1E2000       8K rwx--  /lib/libm.so.1
FF1F0000      48K r-x--  /usr/lib/libCrun.so.1
FF20A000       8K rwx--  /usr/lib/libCrun.so.1
FF20C000      16K rwx--  /usr/lib/libCrun.so.1
FF220000       8K r----    [ anon ]
FF230000      48K r-x--  /lib/libsocket.so.1
FF24C000       8K rwx--  /lib/libsocket.so.1
FF260000       8K r-x--  /usr/lib/libsched.so.1
FF270000       8K r-x--  /platform/sun4u-us3/lib/libc_psr.so.1
FF280000     864K r-x--  /lib/libc.so.1
FF368000      32K rwx--  /lib/libc.so.1
FF370000       8K rwx--  /lib/libc.so.1
FF380000       8K rwx--    [ anon ]
FF390000      24K rwx--    [ anon ]
FF3A0000       8K r-x--  /lib/libdl.so.1
FF3B0000     176K r-x--  /lib/ld.so.1
FF3EC000       8K rwx--  /lib/ld.so.1
FF3EE000       8K rwx--  /lib/ld.so.1
FF3F8000      16K r-x--  /lib/libthread.so.1
FFB80000      24K -----    [ anon ]
FFBEC000      80K rw---    [ stack ]
 total    684104K



On 11/21/06, Rainer Jung <ra...@kippdata.de> wrote:
>
> 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 <li...@steffen-heil.de> 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


-- 
- xucai

Re: tomcat memory usage.

Posted by Rainer Jung <ra...@kippdata.de>.
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 <li...@steffen-heil.de> 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: tomcat memory usage.

Posted by xu cai <je...@gmail.com>.
hi Steffen,

thanks for ur reply. I still have questions on that, see that in-line.

On 11/21/06, Steffen Heil <li...@steffen-heil.de> 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
>
>
>


-- 
- xucai

RE: tomcat memory usage.

Posted by Steffen Heil <li...@steffen-heil.de>.
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.

>  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