简体   繁体   English

运行超过1个tomcat时如何分配jvm内存

[英]how jvm memory allocated when there are more than 1 tomcat running

In the catalina.sh file we specify the maximum Xmx size given to the JVM, i am bit confused on the JVM part, do we have seperate JVM for a different tomcat running?? 在catalina.sh文件中,我们指定了给JVM的最大Xmx大小,我对JVM部分感到有些困惑,对于不同的tomcat运行,我们是否有单独的JVM? or how would it share one JVM ?? 或它将如何共享一个JVM?

If you have more than one Java program running (such as two Tomcat instances), then they each get their own JVM, with potentially different configuration (or even version). 如果您有多个Java程序在运行(例如两个Tomcat实例),则它们每个都将拥有自己的JVM,并且其配置(甚至版本)可能会有所不同。

But if you deploy two webapps into the same Tomcat server, they share a single JVM. 但是,如果将两个Web应用程序部署到同一Tomcat服务器中,则它们共享一个JVM。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM