• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple Tomcat on Same Machine(One JVM) + Total Initial Heap Size

 
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am having 2 tomcat on 1 machine and 1 jvm on the the same machine. both the tomcat shares the same jvm.

now if i allocate 1 GB initial heap to both the tomcat.

and start both the tomcat. Total how much heap will be initialized.

Will it be 1 gb for tomcat1 + 1 gb for tomcat2 = total 2 gb ?

or will it be 1 gb which will be shared by both the tomcat ?


Regards,
Jigar Naik.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Since there will be two separate JVM processes running (no sharing going on), each will get 1 GB, hence 2 GB in all.
 
Jigar Naik
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok.. thanks ulf...
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jigar Naik wrote:... both the tomcat shares the same jvm.



I don't understand how this is possible?
 
Jigar Naik
Ranch Hand
Posts: 763
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Not sure but it should be like.. one jvm two instances.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Saying there is one jvm is a misuse of the term.

There may be one Java installation - library, etc. but each time you start a Java program it gets its own jvm instance. There may be shared library components but that is managed by the operating system.

Using the right words is important.

Bill
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Instead of running two Tomcat instances, it's possible to have a single instance listen on two different ports, thereby still having just a single server process. Not sure if that would help in your circumstances. For that you'd need additional Connector elements inside the Service element in your server.xml. See http://tomcat.apache.org/tomcat-5.5-doc/config/index.html for more details.
 
I'm doing laundry! Look how clean this tiny ad is:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic