1. 미들웨어이야기/01. JVM

IBM JVM option

OSSW(Open Source System SoftWare 2009. 6. 3. 17:11

IBM JVMs

Disclaimer: Please note that the data presented in this document has been gathered from several publicly available sources. It is a conscious selection of available VM parameters and even though we tried to check most of the facts presented this document may contain errors. Also note that the semantics of some of these parameters are different when used with IBM's resettable JVM for the z/OS platform.

Printing Information about GC

-verbose:gc

Prints out information about garbage collections to standard out.
See
-Xverbosegclog

Supported by: 1.3.1, 1.4.1, 1.4.2

-Xverbosegclog:<path to file><filename[,X,Y]>

Prints out information about garbage collections to a file. If the integers X and Y are specified, the output is redirected to X files each containing output from Y GC cycles.
See
-verbose:gc

Supported by: 1.4.1, 1.4.2

Sizing Heap and Generations

-Xmx<value>

Overall maximum heap size. You may use k, m and g for kilobyte, megabyte and gigabyte.
Example:

-Xmx256m sets the maximum heap size to 256mb

Supported by: 1.3.1, 1.4.1, 1.4.2

-Xms<value>

Overall minimum heap size. You may use k, m and g for kilobyte, megabyte and gigabyte.
Example:

-Xmx256m sets the minimum heap size to 256mb

Supported by: 1.3.1, 1.4.1, 1.4.2

-Xinitsh<value>

Sets the initial size of the system heap. Classes in this heap exist for the lifetime of the JVM. The system heap is never subjected to garbage collection. The maximum size of the system heap is unbounded. You may use k, m and g for kilobyte, megabyte and gigabyte.
Example:

-Xinitsh256m sets the minimum system heap size to 256mb

Supported by: 1.3.1, 1.4.1, 1.4.2

-Xmaxf<value>

This is a floating point number between 0 and 1, which specifies the maximum percentage of free space in the heap. The default is 0.6, or 60%. When this value is set to 0, heap contraction is a constant activity. With a value of 1, the heap never contracts. You may use k, m and g for kilobyte, megabyte and gigabyte.
Example:

-Xmaxf0.6 specifies that the heap will be contracted if more

            then 60% of the heap are unused.

Supported by: 1.3.1, 1.4.1, 1.4.2

-Xminf<value>

This is a floating point number between 0 and 1, which specifies the minimum percentage of free space in the heap. The default is 0.3, or 30%. The heap grows if the free space is below the specified amount. You may use k, m and g for kilobyte, megabyte and gigabyte.
Example:

-Xminf0.3 specifies that the heap will be grown if less

            then 30% of the heap are unused.

Supported by: 1.3.1, 1.4.1, 1.4.2

Choosing and Configuring a Collector

-Xgcpolicy:<optthruput|optavgpause|subpool>

Note that the subpool option was introduced in Version 1.4.1 Service Refresh 1 for AIX only.
Setting gcpolicy to optthruput disables concurrent mark. If you do not have pause time problems (as seen by erratic application response times or by analysis of the verbose GC output), you should get the best throughput with this option. optthruput is the default setting.
Setting gcpolicy to optavgpause enables concurrent mark with its default values. If you are having problems with erratic application response times that are caused by normal garbage collections, you can remove those problems at the cost of some throughput when running with the optavgpause option.
Setting gcpolicy to subpool enables improved object allocation that aims to achieve better performance in allocating objects on the heap. This setting might provide additional throughput optimization because it can improve the efficiency of object allocation and reduce lock contention on large SMP systems. Concurrent mark is disabled when this policy is enabled.
Supported by: 1.3.1, 1.4.1, 1.4.2

-Xgcthreads<n>

Sets the total number of threads that are used for garbage collection. On a system with n processors, the default setting is n.
Supported by: 1.3.1, 1.4.1, 1.4.2

-Xcompactgc

Compacts the heap every garbage collection cycle. The default is false (that is, the heap is not compacted). This is not recommended.
Supported by: 1.3.1, 1.4.1, 1.4.2

-Xnocompactgc

Never compact the heap. Default is false.
Supported by: 1.3.1, 1.4.1, 1.4.2

-Xnoclassgc

Disables class garbage collection.
Supported by: 1.3.1, 1.4.1, 1.4.2

Miscellaneous Settings

-Xss<value>

Sets maximum native stack size for any thread.
You may use k, m and g for kilobyte, megabyte and gigabyte.
Example:

-Xss128k sets the stack size to 128kb

Supported by: 1.3.1, 1.4.1, 1.4.2

-Xoss<value>

Sets maximum Java stack size for any thread.
You may use k, m and g for kilobyte, megabyte and gigabyte.
Example:

-Xoss128k sets the stack size to 128kb

Supported by: 1.3.1, 1.4.1, 1.4.2

-Xcompactexplicitgc

Runs full compaction each time java.lang.System.gc() is called. Its default behavior with a java.lang.System.gc() call is to perform a compaction only if an allocation failure triggered a garbage collection since the last java.lang.System.gc() call.
Supported by: 1.4.1, 1.4.2

-Xnocompactexplicitgc

Never runs compaction when java.lang.System.gc() is called. Its default behavior with a java.lang.System.gc() call is to perform a compaction only if an allocation failure triggered a garbage collection since the last java.lang.System.gc() call.
Supported by: 1.4.1, 1.4.2

-Xdisableexplicitgc

Converts Java application calls to java.lang.System.gc() into no-ops.
Supported by: 1.4.1, 1.4.2


'1. 미들웨어이야기 > 01. JVM' 카테고리의 다른 글

SUN JVM option  (0) 2009.06.03
HP JVM option  (0) 2009.06.03
JVM GC(Garbage Collection) 이란?  (0) 2009.06.03
WAS Hang-up 장애  (0) 2009.06.03
CPU 과부하로 인한 응답속도 저하 문제 분석 - HP  (0) 2009.06.03