Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Performance of Multiple instances of tomcat

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does it make sense to have multiple instances of tomcat per physical server for scaling. For example I have an 8 core box with 4GB of mem - would it be better (performant) if i had 1 instance of tomcat with say 2 GB heap allocated or say 4 instances of tomcat with 512GB heap space allocated to each instance
Has someone done any benchmarking for this sort of configurations?

thanks,
-anish
 
Saloon Keeper
Posts: 23259
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I helped set up a cluster of 4 quad-core boxes, each of which had 4 Tomcat instances on them. However, the multiple instances were for continuity's sake. The performance part was in having 4 physical boxes.

As a general rule, the maximum number of Tomcat instances you run on a single box should not exceed the number of CPU cores, although in the case of low-usage servers where separation of resources is critical, even that rule is bendable.

Since Tomcat isn't doing Virtual Memory internally, having a larger heap size usually won't gain you much. It would just be wasted memory.
 
anish joseph
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks tim. We have a situation where we are expecting heavy traffic on a specific day and since i had extra cores on the existing system (no extra systems) i figured i will try and scale by adding more tomcat instances and hope that we scale.
 
Tim Holloway
Saloon Keeper
Posts: 23259
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

anish joseph wrote:thanks tim. We have a situation where we are expecting heavy traffic on a specific day and since i had extra cores on the existing system (no extra systems) i figured i will try and scale by adding more tomcat instances and hope that we scale.



You'd be better off tuning the thread pools, actually. Additional threads cost relatively little. Additional JVMs cost a lot more.
 
Being a smart alec beats the alternative. This tiny ad knows what I'm talking about:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic