2010-12-09

HotSpot VM Tuning []

Moved to the page http://3rdstage.wikia.com/wiki/J2EE_Application_Tuning in my wiki as of 5th Oct. 2012.

Articles

Identifying Current/Min/Max Size of Young and Old Generation

You can identify details of memory usage such as min./max. size of old generation, current size of eden space and current size young generation on a running VM instance using jstat command.

For example, the VM launched with the following option.


-Xms128m -Xmx256m -XX:MaxPermSize=256M -server -XX:+UseParallelGC -XX:NewRatio=2 -XX:SurvivorRatio=8

Shows the following information with jstat -gccapacity -h5 3680 5s.


C:\lang\jdk1.6\bin>jstat -gccapacity -h5 3680 5s
 NGCMN    NGCMX     NGC     S0C   S1C       EC      OGCMN      OGCMX       OGC         OC      PGCMN    PGCMX     PGC
    PC     YGC    FGC
 43648.0  87360.0  43648.0 4480.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     48     3
 43648.0  87360.0  43648.0 4480.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     48     3
 43648.0  87360.0  43648.0 4480.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     48     3
 43648.0  87360.0  43648.0 4480.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     48     3
 43648.0  87360.0  43648.0 4480.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     48     3
 NGCMN    NGCMX     NGC     S0C   S1C       EC      OGCMN      OGCMX       OGC         OC      PGCMN    PGCMX     PGC
    PC     YGC    FGC
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3
 NGCMN    NGCMX     NGC     S0C   S1C       EC      OGCMN      OGCMX       OGC         OC      PGCMN    PGCMX     PGC
    PC     YGC    FGC
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3
 43648.0  87360.0  43648.0 4352.0 4416.0  34752.0    87424.0   174784.0   116608.0   116608.0  16384.0 262144.0 103936.0
 103936.0     49     3

You can identify the above statistics in visual form using visualgc. visualgc is provided as a plugin of VisualVM.

References

0 comments:

Post a Comment