When deploying Coherence on Sun JVMs please be aware of the following:
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.
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.
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.
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:
-XX:OnOutOfMemoryError="kill -9 %p"
-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: