Re: Tomcat Multi-Threading
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