Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #21845 > unrolled thread

Tomcat Multi-Threading

Started byzigzagdna@yahoo.com
First post2013-01-29 17:59 -0800
Last post2013-01-30 08:51 +0000
Articles 20 on this page of 28 — 7 participants

Back to article view | Back to comp.lang.java.programmer


Contents

  Tomcat Multi-Threading zigzagdna@yahoo.com - 2013-01-29 17:59 -0800
    Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-01-29 21:21 -0500
      Re: Tomcat Multi-Threading zigzagdna@yahoo.com - 2013-01-29 19:48 -0800
    Re: Tomcat Multi-Threading Lew <lewbloch@gmail.com> - 2013-01-29 18:31 -0800
      Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-01-29 21:39 -0500
        Re: Tomcat Multi-Threading Lew <lewbloch@gmail.com> - 2013-01-29 22:54 -0800
          Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-01-30 22:09 -0500
        Re: Tomcat Multi-Threading Magnus Warker <magnus@mailinator.com> - 2013-01-30 09:34 +0100
          Re: Tomcat Multi-Threading Lew <lewbloch@gmail.com> - 2013-01-30 08:28 -0800
            Re: Tomcat Multi-Threading Magnus Warker <magnus@mailinator.com> - 2013-01-30 18:04 +0100
              Re: Tomcat Multi-Threading jlp <jlp@jlp.com> - 2013-01-30 18:44 +0100
              Re: Tomcat Multi-Threading Lew <lewbloch@gmail.com> - 2013-01-30 09:49 -0800
                Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-01-30 22:17 -0500
                Re: Tomcat Multi-Threading Magnus Warker <magnus@mailinator.com> - 2013-02-01 18:33 +0100
                  Re: Tomcat Multi-Threading Lew <lewbloch@gmail.com> - 2013-02-01 11:23 -0800
                    Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-02-01 17:36 -0500
                    Re: Tomcat Multi-Threading Magnus Warker <magnus@mailinator.com> - 2013-02-03 07:17 +0100
            Re: Tomcat Multi-Threading lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-01-30 17:49 +0000
              Re: Tomcat Multi-Threading zigzagdna@yahoo.com - 2013-01-30 11:29 -0800
                Re: Tomcat Multi-Threading Leif Roar Moldskred <leifm@dimnakorr.com> - 2013-01-30 14:30 -0600
                  Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-01-30 22:00 -0500
                Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-01-30 21:59 -0500
              Re: Tomcat Multi-Threading Lew <lewbloch@gmail.com> - 2013-01-30 14:48 -0800
                Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-01-30 22:21 -0500
                  Re: Tomcat Multi-Threading lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-01-31 08:47 +0000
                    Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-02-01 17:39 -0500
            Re: Tomcat Multi-Threading Arne Vajhøj <arne@vajhoej.dk> - 2013-01-30 22:12 -0500
    Re: Tomcat Multi-Threading lipska the kat <"nospam at neversurrender dot co dot uk"> - 2013-01-30 08:51 +0000

Page 1 of 2  [1] 2  Next page →


#21845 — Tomcat Multi-Threading

Fromzigzagdna@yahoo.com
Date2013-01-29 17:59 -0800
SubjectTomcat Multi-Threading
Message-ID<b0a71c30-d85f-4acc-9d36-d9c1f397f69e@googlegroups.com>
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? 

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.

[toc] | [next] | [standalone]


#21846

FromArne Vajhøj <arne@vajhoej.dk>
Date2013-01-29 21:21 -0500
Message-ID<510883c1$0$286$14726298@news.sunsite.dk>
In reply to#21845
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

[toc] | [prev] | [next] | [standalone]


#21852

Fromzigzagdna@yahoo.com
Date2013-01-29 19:48 -0800
Message-ID<bcdc502e-9d26-435f-9c73-a2e8a306d9bb@googlegroups.com>
In reply to#21846
On Tuesday, January 29, 2013 9:21:48 PM UTC-5, Arne Vajhøj wrote:


Arne:
Thanks a lot.

[toc] | [prev] | [next] | [standalone]


#21847

FromLew <lewbloch@gmail.com>
Date2013-01-29 18:31 -0800
Message-ID<faa97c61-c830-4201-9314-4f38df1c770f@googlegroups.com>
In reply to#21845
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

[toc] | [prev] | [next] | [standalone]


#21848

FromArne Vajhøj <arne@vajhoej.dk>
Date2013-01-29 21:39 -0500
Message-ID<510887fc$0$286$14726298@news.sunsite.dk>
In reply to#21847
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

[toc] | [prev] | [next] | [standalone]


#21856

FromLew <lewbloch@gmail.com>
Date2013-01-29 22:54 -0800
Message-ID<86d97a61-acf1-420d-aa48-928619895157@googlegroups.com>
In reply to#21848
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

[toc] | [prev] | [next] | [standalone]


#21904

FromArne Vajhøj <arne@vajhoej.dk>
Date2013-01-30 22:09 -0500
Message-ID<5109e06d$0$295$14726298@news.sunsite.dk>
In reply to#21856
On 1/30/2013 1:54 AM, Lew 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. 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.

That comment was specifically towards you claim that there were
no single threaded apps in Java.

The discussion is not relevant for OP as he has very multi threaded
app.

Arne

[toc] | [prev] | [next] | [standalone]


#21859

FromMagnus Warker <magnus@mailinator.com>
Date2013-01-30 09:34 +0100
Message-ID<kealt4$h8s$1@news.m-online.net>
In reply to#21848
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

[toc] | [prev] | [next] | [standalone]


#21871

FromLew <lewbloch@gmail.com>
Date2013-01-30 08:28 -0800
Message-ID<692563e7-016b-4f22-afaa-228965e501b8@googlegroups.com>
In reply to#21859
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.

Do a little research.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#21875

FromMagnus Warker <magnus@mailinator.com>
Date2013-01-30 18:04 +0100
Message-ID<kebjq2$ing$1@news.m-online.net>
In reply to#21871
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

[toc] | [prev] | [next] | [standalone]


#21876

Fromjlp <jlp@jlp.com>
Date2013-01-30 18:44 +0100
Message-ID<51095be5$0$8993$ba4acef3@reader.news.orange.fr>
In reply to#21875
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

[toc] | [prev] | [next] | [standalone]


#21877

FromLew <lewbloch@gmail.com>
Date2013-01-30 09:49 -0800
Message-ID<155371c3-be4a-45c9-bd88-ec640ea51013@googlegroups.com>
In reply to#21875
Magnus Warker wrote:
> 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.

No, it isn't.

The Java application, from the OS perspective, comprises the JVM and everything it runs.

The application doesn't exist outside the context of the JVM, so such considerations matter.

Even more important, the OP wants to know if multiple CPUs will help performance of a 
Java app if it's multithreaded. Since the app runs in a multi-threaded context, if multiple 
CPUs would speed up a multi-threaded app, they'd help *any* Java app.  I made this point 
upthread; I guess you decided to ignore it in order to snark, huh?

Let's try to stay focused on the OP's concern here, shall we?

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#21907

FromArne Vajhøj <arne@vajhoej.dk>
Date2013-01-30 22:17 -0500
Message-ID<5109e265$0$295$14726298@news.sunsite.dk>
In reply to#21877
On 1/30/2013 12:49 PM, Lew wrote:
> Magnus Warker wrote:
>> 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.
>
> No, it isn't.
>
> The Java application, from the OS perspective, comprises the JVM and everything it runs.
>
> The application doesn't exist outside the context of the JVM, so such considerations matter.

As you can write runtimes and runtime libs that start threads for any
language, then you logic of "some JVM's start threads => Java
applications are always multi threaded" implies that it is
only possible to write single threaded apps in languages
like assembler where you can control exactly what happens.

That is of course a perfectly consistent terminology.

But it is not the terminology used in the IT industry.

A multi threaded app in common terminology is where the application
itself contains code that result in threads being started.

Arne

[toc] | [prev] | [next] | [standalone]


#21959

FromMagnus Warker <magnus@mailinator.com>
Date2013-02-01 18:33 +0100
Message-ID<kegu8m$acs$1@news.m-online.net>
In reply to#21877
On 01/30/2013 06:49 PM, Lew wrote:
> Magnus Warker wrote:
>> Lew wrote:

>>> 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.

> Even more important, the OP wants to know if multiple CPUs will help performance of a
> Java app if it's multithreaded. Since the app runs in a multi-threaded context, if multiple
> CPUs would speed up a multi-threaded app, they'd help *any* Java app.  I made this point
> upthread;

I can only repeat what others already pointed out:

You are confusing multi-threading in java applications and processes 
that are multi-threaded from the os perspective.

> I guess you decided to ignore it in order to snark, huh?

This is your job.

Magnus

[toc] | [prev] | [next] | [standalone]


#21969

FromLew <lewbloch@gmail.com>
Date2013-02-01 11:23 -0800
Message-ID<a72b1b1c-2b63-43cd-ba51-a4bc3cc2b7a8@googlegroups.com>
In reply to#21959
Magnus Warker wrote:
>  Lew wrote:
>> Magnus Warker wrote:
>>> Lew wrote:
> 
>>>> 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.
> 
>> Even more important, the OP wants to know if multiple CPUs will help performance of a
>> Java app if it's multithreaded. Since the app runs in a multi-threaded context, if multiple
>> CPUs would speed up a multi-threaded app, they'd help *any* Java app.  I made this point
>> upthread;
> 
> I can only repeat what others already pointed out:

Indeed.

> You are confusing multi-threading in java applications and processes 
> that are multi-threaded from the os [sic] perspective.

No, I am not. I am referring to the fact that the Java application is multi-threaded 
from the OS perspective. No confusion involved.

>> I guess you decided to ignore it in order to snark, huh?
> 
> This is your job.

Let's try again. The OP wants to know if multiple CPUs will help an app. 

Now they were talking about Tomcat, in which the container is multi-threaded 
but the app you write is not. Sorta parallel, huh?

But everyone agrees that the presence of multiple threads in the parent engine 
means that the question of hardware speedup pertains.

Same with the JVM. The presence of multiple threads in the application, notwithstanding 
that they are part of the application's execution environment as with Tomcat, and 
not in the app itself (follow along now - this is the hard part), means that any influence 
of multiple CPUs on multiple threads will pertain.

So the fact that these threads are part of the JVM's infrastructure and not in the 
mental model of the app itself is utterly irrelevant. 

As would be obvious to you were you paying attention and able to follow along.

I gave you the benefit of the doubt with respect to those assumptions. Ergo, I 
conclude that the logic of my point has not escaped you. Ergo, I conclude you 
have another motive for disagreeing publicly. I only can think of one such motive, 
the desire to snark.

So I conclude on the evidence that the purpose of your response is to snark.

Otherwise I have to conclude that you have diminished capacity, and I do not believe that.

-- 
Lew

[toc] | [prev] | [next] | [standalone]


#21980

FromArne Vajhøj <arne@vajhoej.dk>
Date2013-02-01 17:36 -0500
Message-ID<510c4370$0$293$14726298@news.sunsite.dk>
In reply to#21969
On 2/1/2013 2:23 PM, Lew wrote:
> Magnus Warker wrote:
>> You are confusing multi-threading in java applications and processes
>> that are multi-threaded from the os [sic] perspective.
>
> No, I am not. I am referring to the fact that the Java application is multi-threaded
> from the OS perspective. No confusion involved.

Pretty confusing that the fact that such an application becomes
multi threaded by the fact that there exist a JVM that creates more
threads.

That is not a common definition of multi threaded.

As the same Java application can run on many different JVM's and OS'es,
then I don't see a Java application being anything from OS perspective.

AFAIK then the Java specifications does not even require threads at
the OS level.

Arne

[toc] | [prev] | [next] | [standalone]


#22039

FromMagnus Warker <magnus@mailinator.com>
Date2013-02-03 07:17 +0100
Message-ID<kekve4$us7$1@news.m-online.net>
In reply to#21969
On 02/01/2013 08:23 PM, Lew wrote:
> Magnus Warker wrote:
>>   Lew wrote:

>> You are confusing multi-threading in java applications and processes
>> that are multi-threaded from the os [sic] perspective.

> No, I am not. I am referring to the fact that the Java application is multi-threaded
> from the OS perspective. No confusion involved.

The OS does not see any "java applications".

> So the fact that these threads are part of the JVM's infrastructure and not in the
> mental model of the app itself is utterly irrelevant.

The multi-threading ability is no absolute ability, but it's relative to 
some context. A java application does not automatically become 
multi-threaded, just because its environment process runs multiple 
threads from the os perspective.

> So I conclude on the evidence that the purpose of your response is to snark.

This is your job.

Magnus

[toc] | [prev] | [next] | [standalone]


#21878

Fromlipska the kat <"nospam at neversurrender dot co dot uk">
Date2013-01-30 17:49 +0000
Message-ID<d8WdnWAp7YW1wJTMnZ2dnUVZ8jmdnZ2d@bt.com>
In reply to#21871
On 30/01/13 16:28, 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.

I think you may be confusing the VM and the threads it uses to do 
housekeeping (garbage collection, assignment of execution threads to 
multiple processors etc) with the application running in the VM, which, 
unless you explicitly create a new Thread in your code will by default 
be single threaded.

> Do a little research.

Well quite

lipska

-- 
Lipska the Kat©: Troll hunter, sandbox destroyer
and farscape dreamer of Aeryn Sun

[toc] | [prev] | [next] | [standalone]


#21879

Fromzigzagdna@yahoo.com
Date2013-01-30 11:29 -0800
Message-ID<3d3ae65e-f275-45ea-8e9f-3c8e0a0587fe@googlegroups.com>
In reply to#21878
On Wednesday, January 30, 2013 12:49:24 PM UTC-5, lipska the kat wrote:
> On 30/01/13 16:28, 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. I think you may be confusing the VM and the threads it uses to do housekeeping (garbage collection, assignment of execution threads to multiple processors etc) with the application running in the VM, which, unless you explicitly create a new Thread in your code will by default be single threaded. > Do a little research. Well quite lipska -- Lipska the Kat©: Troll hunter, sandbox destroyer and farscape dreamer of Aeryn Sun

Thanks a lot to all of your insight. I do not see any separate java process for my "application". I only see tomcata6.exe which shows many threads, so I assuming my "application" is multi-theraded and more CPU's should help!!!

[toc] | [prev] | [next] | [standalone]


#21883

FromLeif Roar Moldskred <leifm@dimnakorr.com>
Date2013-01-30 14:30 -0600
Message-ID<Vvydne26999HH5TMnZ2dnUVZ8oudnZ2d@giganews.com>
In reply to#21879
zigzagdna@yahoo.com wrote:

> Thanks a lot to all of your insight. I do not see any separate java
> process for my "application". I only see tomcata6.exe which shows
> many threads, so I assuming my "application" is multi-theraded and
> more CPU's should help!!!

That's not necessarily the case. Whether more CPU cores will improve
an application's performance depends on how the application balances
CPU load across threads -- not just the number of threads it uses. If
an application uses 20 threads, but 19 of those spends almost all
their time waiting on work being done in the 20th thread, throwing
more cores at the application isn't going to make a measureable
difference.

(In the worst case scenario, adding more cores might bring to light so
far unnoticed concurrency errors in the application and actually
_decrease_ performance.)

That's not to say you shouldn't try adding more cores: it's a quick
and easy thing to do, and it's likely to help at least a little. Just
don't believe in any performance gain until you've gone and measured
it.

-- 
Leif Roar Moldskred

[toc] | [prev] | [next] | [standalone]


Page 1 of 2  [1] 2  Next page →

Back to top | Article view | comp.lang.java.programmer


csiph-web