![]() |
Tomcat Multi-Threading
I am using Apache Tomcat 6.x on a Windows 2003 Server R2. I can see Apache Tomcat is a multithreaded applications, no of threads arrange from 50 to 300. Since it is a multithreaded application, I am assuming that if add more CPU’s to box, it should improve performance because different CPU’s canrun different threads? Is my assumption correct?
I know some applications are single threaded, so adding more CPU’s does not really help, but in case of Tomcat, it should improve the performance. |
Re: Tomcat Multi-Threading
On 1/29/2013 8:59 PM, zigzagdna@yahoo.com wrote:
> I am using Apache Tomcat 6.x on a Windows 2003 Server R2. I can see > Apache Tomcat is a multithreaded applications, no of threads arrange > from 50 to 300. Since it is a multithreaded application, I am > assuming that if add more CPU’s to box, it should improve performance > because different CPU’s can run different threads? Is my assumption > correct? If the CPU is the bottleneck then yes. Arne |
Re: Tomcat Multi-Threading
zigz...@ wrote:
> I am using Apache Tomcat 6.x on a Windows 2003 Server R2. I can see Apache Tomcat is a multithreaded applications, no of threads arrange from 50 to 300. Since it is a multithreaded application, I am assuming that if add more CPU’s [sic] to box, it should improve performance because different CPU’s can run different threads? Is my assumption correct? Only testing will tell. Whenever it's an assumption it's probably false. > I know some applications are single threaded, so adding more CPU’s [sic] does not really help, but in case of Tomcat, it should improve the performance. It "should"? That's a strong statement given you have no evidence. In the world of Java, no applications are single threaded. -- Lew |
Re: Tomcat Multi-Threading
On 1/29/2013 9:31 PM, Lew wrote:
> In the world of Java, no applications are single threaded. I think most people would consider a console app with no threads to be single-threaded. Whether the JVM uses some threads behind the scene for various purposes is a JVM implementation detail. Arne |
Re: Tomcat Multi-Threading
On Tuesday, January 29, 2013 9:21:48 PM UTC-5, Arne Vajhøj wrote:
Arne: Thanks a lot. |
Re: Tomcat Multi-Threading
Arne Vajhøj wrote:
> Lew wrote: >> In the world of Java, no applications are single threaded. > > I think most people would consider a console app with no > threads to be single-threaded. Whether the JVM uses some > threads behind the scene for various purposes is a JVM > implementation detail. A detail that is directly relevant to the OP's question about whether multiple CPUs would enhance performance! This is one scenario where you cannot merely wave your hands and pretend the console app is single threaded, because if multiple CPUs do help performance of multi-threaded Java programs, then they'll help that app, too. In your rush to disagree you threw out the baby with the bath water. -- Lew |
Re: Tomcat Multi-Threading
On 01/30/2013 03:39 AM, Arne Vajhøj wrote:
> On 1/29/2013 9:31 PM, Lew wrote: >> In the world of Java, no applications are single threaded. > > I think most people would consider a console app with no > threads to be single-threaded. There is even no relationship between a programming language and the threading architecture of an application. The fact that Java supports multi-threading does not lead to the fact that every Java application is multi-threaded. Magnus |
Re: Tomcat Multi-Threading
Magnus Warker wrote:
> Arne Vajhøj wrote: >> Lew wrote: >>> In the world of Java, no applications are single threaded. >> I think most people would consider a console app with no >> threads to be single-threaded. > > There is even no relationship between a programming language and the > threading architecture of an application. The fact that Java supports > multi-threading does not lead to the fact that every Java application is > multi-threaded. No, the first fact does not lead to the second fact, but the second fact isnevertheless true. The JVM is multi-threaded and has, what, a minimum of four? at any rate severa; threads running even if the application only uses one of them. Do a little research. -- Lew |
Re: Tomcat Multi-Threading
On 01/30/2013 05:28 PM, Lew wrote:
> Magnus Warker wrote: >> Arne Vajhøj wrote: >>> Lew wrote: >>>> In the world of Java, no applications are single threaded. >>> I think most people would consider a console app with no >>> threads to be single-threaded. >> >> There is even no relationship between a programming language and the >> threading architecture of an application. The fact that Java supports >> multi-threading does not lead to the fact that every Java application is >> multi-threaded. > > No, the first fact does not lead to the second fact, but the second fact is nevertheless true. > > The JVM is multi-threaded and has, what, a minimum of four? at any rate severa; threads running > even if the application only uses one of them. There is a mistake in your logical conclusion: Even if the VM is multi-threaded, the applications running on top of them may still be single-threaded. So your statement ("no applications are single threaded") is simply wrong. Magnus |
Re: Tomcat Multi-Threading
Le 30/01/2013 18:04, Magnus Warker a écrit :
> On 01/30/2013 05:28 PM, Lew wrote: >> Magnus Warker wrote: >>> Arne Vajhøj wrote: >>>> Lew wrote: >>>>> In the world of Java, no applications are single threaded. >>>> I think most people would consider a console app with no >>>> threads to be single-threaded. >>> >>> There is even no relationship between a programming language and the >>> threading architecture of an application. The fact that Java supports >>> multi-threading does not lead to the fact that every Java application is >>> multi-threaded. >> >> No, the first fact does not lead to the second fact, but the second >> fact is nevertheless true. >> >> The JVM is multi-threaded and has, what, a minimum of four? at any >> rate severa; threads running >> even if the application only uses one of them. > > There is a mistake in your logical conclusion: Even if the VM is > multi-threaded, the applications running on top of them may still be > single-threaded. So your statement ("no applications are single > threaded") is simply wrong. > > Magnus > Notice also that the OP talks about Tomcat and not directly a standalone application. Tomcat, is a servlet container can handle multiple http/https/AJP connections with its ThreadPool ( if obviously this pool is not sized to 1). Naturally Web-apps are multi-Threaded. -- Cordialement Jean-Louis Pasturel |
| All times are GMT. The time now is 08:27 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.