Deployment Considerations - Sun JVMs

Skip to end of metadata
Go to start of metadata

When deploying Coherence on Sun JVMs please be aware of the following:

Heap Sizes

With 1.4 JVMs Coherence recommends keeping heap sizes below 1GB in size per JVM. Multiple cache servers can be used allow a single machine to achieve higher capacities. With Sun's 1.5 JVMs, heap sizes beyond 1GB are reasonable, though GC tuning is still advisable to minimize long GC pauses. See Sun's GC Tuning Guide for tuning details. It is also advisable to run with fixed sized heaps as this generally lowers GC times.

AtomicLong

When available Coherence will make use of the highly concurrent AtomicLong class, which allows concurrent atomic updates to long values without requiring synchronization. Sun 1.4 client JVMs include an implementation which is not stable on some multiprocessor systems. If Coherence detects that it is being run on a Sun 1.4 client JVM it will default to a safe but slower synchronized implementation, and will output the following log message.

sun.misc.AtomicLong is not supported on this JVM; using a synchronized counter.

It is suggested that you run your 1.4 JVMs in server mode to ensure that the stable and highly concurrent version can be utilized. To run the JVM in server mode include the -server option on the Java command line.

OutOfMemoryError

JVMs that experience an OutOfMemoryError can be left in an indeterministic state which can have adverse effects on a cluster. We recommend configuring JVMs to exit upon encountering an OutOfMemoryError instead of allowing the JVM to attempt recovery. Here are the parameters to configure this setting on Sun JVMs:

Unix:
-XX:OnOutOfMemoryError="kill -9 %p"

Windows:
-XX:OnOutOfMemoryError="taskkill /F /PID %p"

Note: as of December 2008, this flag is available on newer versions of 1.4.2 and 1.6, but not on 1.5.

Additionally, it is recommended to configure the JVM to generate a heap dump if an OutOfMemoryError is thrown in order to assist the investigation into the root cause for the error.

Use the following flag to enable this feature on the Sun JVM:

-XX:+HeapDumpOnOutOfMemoryError

Labels:
None
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.