Tuning Garbage Collection with Sun JDK

8-32 Oracle WebLogic Communications Server Administration Guide -XX:+UseTLAB -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10 -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=256 -XX:CMSInitiatingOccupancyFraction=60 -XX:+DisableExplicitGC For replica servers, use the example settings: -server -Xmx3072m -XX:MaxPermSize=128m -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+UseTLAB -XX:+CMSIncrementalMode -XX:+CMSIncrementalPacing -XX:CMSIncrementalDutyCycleMin=0 -XX:CMSIncrementalDutyCycle=10 -XX:MaxTenuringThreshold=0 -XX:SurvivorRatio=256 -XX:CMSInitiatingOccupancyFraction=60 -XX:+DisableExplicitGC The above options have the following effect: ■ -XX:+UseTLAB—Uses thread-local object allocation blocks. This improves concurrency by reducing contention on the shared heap lock. ■ -XX:+UseParNewGC—Uses a parallel version of the young generation copying collector alongside the concurrent mark-and-sweep collector. This minimizes pauses by using all available CPUs in parallel. The collector is compatible with both the default collector and the Concurrent Mark and Sweep CMS collector. ■ -Xms, -Xmx—Places boundaries on the heap size to increase the predictability of garbage collection. The heap size is limited in replica servers so that even Full GCs do not trigger SIP retransmissions. -Xms sets the starting size to prevent pauses caused by heap expansion. ■ -XX:MaxTenuringThreshold=0—Makes the full NewSize available to every NewGC cycle, and reduces the pause time by not evaluating tenured objects. Technically, this setting promotes all live objects to the older generation, rather than copying them. ■ -XX:SurvivorRatio=128—Specifies a high survivor ratio, which goes along with the zero tenuring threshold to ensure that little space is reserved for absent survivors.

8.9 Avoiding JVM Delays Caused By Random Number Generation

The library used for random number generation in Suns JVM relies on devrandom by default for UNIX platforms. This can potentially block the Oracle WebLogic Communication Services process because on some operating systems devrandom waits for a certain amount of noise to be generated on the host machine before returning a result. Although devrandom is more secure, Oracle recommends using devurandom if the default JVM configuration delays Oracle WebLogic Communication Services startup. To determine if your operating system exhibits this behavior, try displaying a portion of the file from a shell prompt: head -n 1 devrandom 1. Open the JAVA_HOMEjrelibsecurityjava.security file in a text editor. 2. Change the line: securerandom.source=file:devrandom to read: securerandom.source=file:devurandom Monitoring and Troubleshooting 8-33 3. Save your change and exit the text editor.