• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jigar Naik
Ranch Hand
Posts: 762
  • Mark post as helpful
  • send pies
  • 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.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • 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: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok.. thanks ulf...
 
Maneesh Godbole
Saloon Keeper
Posts: 11073
13
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • 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: 762
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure but it should be like.. one jvm two instances.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • 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: 42968
73
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic