aspose file tools*
The moose likes Tomcat and the fly likes Multiple Tomcat on Same Machine(One JVM) + Total Initial Heap Size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Multiple Tomcat on Same Machine(One JVM) + Total Initial Heap Size" Watch "Multiple Tomcat on Same Machine(One JVM) + Total Initial Heap Size" New topic
Author

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

Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
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.


Jigar Naik


Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42273
    
  64
Since there will be two separate JVM processes running (no sharing going on), each will get 1 GB, hence 2 GB in all.


Ping & DNS - my free Android networking tools app
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
ok.. thanks ulf...
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

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


I don't understand how this is possible?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Jigar Naik
Ranch Hand

Joined: Dec 12, 2006
Posts: 757
Not sure but it should be like.. one jvm two instances.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12803
    
    5
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
Marshal

Joined: Mar 22, 2005
Posts: 42273
    
  64
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 agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple Tomcat on Same Machine(One JVM) + Total Initial Heap Size