While most Coherence installations are deployed in clusters ranging from two to 100+ servers, there are many advantages to be gained even in single-server environments, whether running on a commodity quad-processor box or a massive partitioned SMP server.
This section contains the following information:
Generally, modern JVMs can efficiently manage heaps of up to 512MB or even 1GB. Garbage collection routines can slow down dramatically beyond that point. There are two immediate symptoms of this a reduction in overall application throughput due to excessive CPU cycles being dedicated to garbage collection, and substantially increased garbage collection pauses. As heaps grow from 512MB toward the 2GB mark, it is not uncommon to see garbage collection pauses grow from sub-second (~200ms) to as long as 30 seconds.
Coherence users quite often use multiple Coherence instances on each cluster machine to limit heaps to a reasonable size. Coherences linear scalability means that the finer-grained partitioning has no negative impact on application performance, and a huge benefit in terms of minimizing GC pauses. In a single-server environment, the same concept applies. For example, in a dual-processor server with 8GB of RAM, it is very difficult for a Java-based application to utilize all the available memory. Running extra Coherence cache instances will soak up the remaining RAM while having minimal impact on CPU utilization, allowing the application to maximize resource usage.
Another benefit of multiple instances per server is that performance issues can be isolated to specific JVMs. For example, applications that occasionally execute long-running memory-intensive reporting processes can place those reports in dedicated JVMs where they wont interfere with the execution of the primary transactional components of the application. With proper cache configuration, these JVMs can even be started on-demand, joining the cluster for access to shared data, calculating and sharing results, and then exiting the cluster when no longer needed.
Additionally, out-of-memory errors, temp-file disk errors, and (unlikely) JVM faults will bring down a single application instance, and not the entire application. As Coherence can isolate applications from node failures, it is fairly straight-forward to fully isolate users from faults of this nature.
With a clustered application, administration can be controlled in a modular fashion. Application upgrades can be applied in a rolling manner, allowing the application to run smoothly with no down-time and no performance disruptions (e.g. re-loading a cached data set).