You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Iannis Hanen <Ia...@bluejungle.com> on 2005/05/04 19:01:03 UTC

Tomcat processes

Hi everyone,

 

I have a question related to the scalability and performance of Tomcat.
Typically, when tomcat gets started, it creates one process that spawns
all the threads required to answer the requests for all the deployed web
applications. 

 

Let's assume that I have 6 distinct web applications to deploy on a
tomcat instance. If tomcat runs on a single high end server machine
(with multi CPU), I am wondering which approach would scale better:

 

1)     launch tomcat once with the 6 web applications (the "regular"
way)

2)     create two server.xml files (one server.xml including 3 web apps,
and another one containing the remaining 3), and start two tomcat
instances (running on different port obviously) on the same machine.

3)     Follow approach 2 except that each tomcat instance contains all 6
web apps (and some load balancer is put in front). 

 

In short, I am wondering if having multiple tomcat processes running on
a multi CPU box would scale better than having a single tomcat process
dealing with everything. Is there a way to tune up the number or tomcat
processes from server.xml or elsewhere? I could not find anything
related to the number of processes to spawn at all. In some app server,
it is possible to create several process for the same application. Is
there anything similar in Tomcat? 

 

Best regards,

Iannis


RE: Tomcat processes

Posted by "J. Ryan Earl" <ry...@dynaconnections.com>.
Generally speaking, one process with a lot of threads should perform better
than distributing the threads among multiple processes because you're not
doing as much context switching and it's more efficient on caches.

J. Ryan Earl
Systems/Network Engineer
dynaConnections Corporation
512.306.9898

-----Original Message-----
From: Iannis Hanen [mailto:Iannis.Hanen@bluejungle.com]
Sent: Wednesday, May 04, 2005 12:01 PM
To: tomcat-user@jakarta.apache.org
Subject: Tomcat processes


Hi everyone,



I have a question related to the scalability and performance of Tomcat.
Typically, when tomcat gets started, it creates one process that spawns
all the threads required to answer the requests for all the deployed web
applications.



Let's assume that I have 6 distinct web applications to deploy on a
tomcat instance. If tomcat runs on a single high end server machine
(with multi CPU), I am wondering which approach would scale better:



1)     launch tomcat once with the 6 web applications (the "regular"
way)

2)     create two server.xml files (one server.xml including 3 web apps,
and another one containing the remaining 3), and start two tomcat
instances (running on different port obviously) on the same machine.

3)     Follow approach 2 except that each tomcat instance contains all 6
web apps (and some load balancer is put in front).



In short, I am wondering if having multiple tomcat processes running on
a multi CPU box would scale better than having a single tomcat process
dealing with everything. Is there a way to tune up the number or tomcat
processes from server.xml or elsewhere? I could not find anything
related to the number of processes to spawn at all. In some app server,
it is possible to create several process for the same application. Is
there anything similar in Tomcat?



Best regards,

Iannis



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org