Reputation: 20663
Is there any way to determine how many threads can specific JVM + Application Server combination handle? The question is not only about web application request serving threads, but also about background threads.
Upvotes: 0
Views: 700
Reputation: 55897
For all practical purposes this is situational, it really does "depend".
Java EE App Server applications tend not to create threads themselves. Rather you configure thread pools. I've never yet been in a situation where the ability to create 10 more threads would solve a problem and some app server limitation prevented me from doing so.
Making performance comparisons between different App Servers is very non-trivial and the answers tend to brittle - ie. small changes in the type of work can produce different answers.
Why are you asking the question?
Upvotes: 2
Reputation: 22914
This is really dependent on the particular hardware you are running with (number of CPUs, amount of memory, etc.) and also dependent on the OS (Solaris vs. Windows) since the underlying threading is dependent on the OS-provided thread management. It also depends on the application and app server itself, since the amount of resources each thread consumes is application-dependent.
Upvotes: 1
Reputation: 28409
This really isn't something that you can find out purely from the Java VM. It is more of a hardware/OS limitation than anything specific to the VM. The best way to find out this answer is to test with a large number of threads and see where you start to see a performance dropoff. See also this devx discussion.
Upvotes: 0