Why do we use multi application server instances on the same server

Sebastien Lorber picture Sebastien Lorber · Dec 31, 2010 · Viewed 11.9k times · Source

I guess there is a good reason, but I don't understand why sometimes we put for example 5 instances having the same webapplications on the same physical server.

Has it something to do with an optimisation for a multi processor architecture? The max allowed ram limit for JVM or something else?

Answer

Favonius picture Favonius · Dec 31, 2010

Hmmm... After a long time I am seeing this question again :)

Well a multiple JVM instances on a single machine solves a lot of issues. First of let us face this: Although JDK 1.7 is coming into picture, a lot of legacy application were developed using JDK 1.3 or 1.4 or 1.5. And still a major chunk of JDK is divided among them.

Now to your question:

Historically, there are three primary issues that system architects have addressed by deploying multiple JVMs on a single box:

  1. Garbage collection inefficiencies: As heap sizes grow, garbage collection cycles--especially for major collections--tended to introduce significant delays into processing, thanks to the single-threaded GC. Multiple JVMs combat this by allowing smaller heap sizes in general and enabling some measure of concurrency during GC cycles (e.g., with four nodes, when one goes into GC, you still have three others actively processing).

  2. Resource utilization: Older JVMs were unable to scale efficiently past four CPUs or so. The answer? Run a separate JVM for every 2 CPUs in the box (mileage may vary depending on the application, of course).

  3. 64-bit issues: Older JVMs were unable to allocate heap sizes beyond the 32-bit maximum. Again, multiple JVMs allow you to maximize your resource utilization.

  4. Availability: One final reason that people sometimes run multiple JVMs on a single box is for availability. While it's true that this practice doesn't address hardware failures, it does address a failure in a single instance of an application server.

Taken from ( http://www.theserverside.com/discussions/thread.tss?thread_id=20044 )

I have mostly seen weblogic. Here is a link for further reading:

http://download.oracle.com/docs/cd/E13222_01/wls/docs92/perform/WLSTuning.html#wp1104298

Hope this will help you.