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
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply 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: 744
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: 35258
    
    7
Since there will be two separate JVM processes running (no sharing going on), each will get 1 GB, hence 2 GB in all.


Android appsImageJ pluginsJava web charts
Jigar Naik
Ranch Hand

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

Joined: Jul 26, 2007
Posts: 8441

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


I don't understand how this is possible?


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

Joined: Dec 12, 2006
Posts: 744
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: 12271
    
    1
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


Java Resources at www.wbrogden.com
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35258
    
    7
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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Multiple Tomcat on Same Machine(One JVM) + Total Initial Heap Size
 
Similar Threads
WebSphere : JVM Heap size
Heap Memory usage
Stack Vs. Heap
Java Heap size
Max Heap size on Websphere 5