Option
|
Detailed
Description
|
-Xns (setting the Nursery)
|
We should try to make the
nursery as large as possible while still keeping the garbage collection pause
times acceptably low. This is particularly important for our application is
creating a lot of temporary objects.
The maximum size of a nursery
cannot exceed 95% of the maximum heap size.
|
-Xms (Setting initial and minimum heap
size)
|
Oracle recommends setting the
minimum heap size (-Xms) equal to the maximum heap size (-Xmx) to minimize
garbage collections.
|
-Xms (Setting maximum heap size)
|
Setting a low maximum heap
value compared to the amount of live data decrease performance by forcing
frequent garbage collections.
|
SoftRefLRUPolicyMSPerMB
|
Softly reachable objects will
remain alive for some amount of time after the last time they were
referenced. The default value is one
second of lifetime per free megabyte in the heap. This value can be
adjusted using the -XX:SoftRefLRUPolicyMSPerMB
flag, which accepts integer values representing milliseconds.
For example, to change the
value from one second to 2.5 seconds, use this flag:
-XX:SoftRefLRUPolicyMSPerMB=2500
|
Dweblogic.threadpool.MaxPoolSize
|
There are different ways of
changing the size of thread pool. One
way of doing it is by setting them from the command line:
-Dweblogic.threadpool.MinPoolSize=5 -Dweblogic.threadpool.MaxPoolSize=5
By setting both MinPoolSize and MaxPoolSize to be the
same value, we have forced WLS to use
exactly five worker threads.
|
Note that the values of -Xmn and SoftRefLRUPolicyMSPerMB(0-1000)
can aslo be adjusted in accordance with the respective application memory
settings and requirements.
For example, If we start the
WebLogic Server instance from a java command line, we can specify the heap size
values as follows:
$ java -Xns10m -Xms512m -Xmx512m
The default size for these
values is measured in bytes. Append the letter 'k' or 'K' to the value to
indicate kilobytes, 'm' or 'M' to indicate megabytes, and 'g' or 'G' to
indicate gigabytes.
The example above allocates 10
megabytes of memory to the Nursery heap sizes and 512 megabytes of memory to
the minimum and maximum heap sizes for the WebLogic Server instance running in
the JVM.
No comments:
Post a Comment