aspose file tools
The moose likes Threads and Synchronization and the fly likes Determining thread pool size in constrained pools Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Reply Bookmark "Determining thread pool size in constrained pools" Watch "Determining thread pool size in constrained pools" New topic
Author

Determining thread pool size in constrained pools

Yuri Gadow
Greenhorn

Joined: May 08, 2001
Posts: 28
I'm wondering if anyone has come across (or has done) research into theories regarding optimal thread counts for thread pools in Java. Given that an application may well run on a variety of different hardware platforms with very different on-chip MT approaches, different cache schemes and sizes, not to mention differing SMP implementations, how does one determine a reasonably optimal number of threads to spawn for pools where work units are isolated (and thus do not deadlock due to starvation) and could potentially be spread across a large (say, fifty plus) number of threads. I'm sure Sun would have us wave our hands at this and base it on the profile of the work being executed. That's probably the best policy in most cases. But I wonder, in a performance critical scenario, is this the best we can do? Is there a single, "optimal compromise", or should hardware be interrogated at startup?
While writing this, it occurs to me that this might be a good fit for genetic programming, thoughts?
Jim Baiter
Ranch Hand

Joined: Jan 05, 2001
Posts: 532
I think you would waste more cycles monitoring and determining these statistics than you would benefit from them.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Determining thread pool size in constrained pools
 
Similar Threads
Steps to Modify the Default Thread Count and Execute Queue Thread Size Tuning in weblogic 10MP1
Writing Software for Multicore System
MaximumThroughput- MltiThreading - Need help
Synchronously invoking web service using threads?
How to identify the maximum number of threads without degrading my systems performance ?