permaculture playing cards*
The moose likes Threads and Synchronization and the fly likes How to identify the maximum number of threads without degrading my systems performance ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "How to identify the maximum number of threads without degrading my systems performance ?" Watch "How to identify the maximum number of threads without degrading my systems performance ?" New topic
Author

How to identify the maximum number of threads without degrading my systems performance ?

adil qureshi
Ranch Hand

Joined: Jul 11, 2008
Posts: 48
I want to know is there any way ,any formula by which i can calculate the maximum number threads i can create without affecting performance.Considering all are doing similar work .


SCJP 1.5,SCWCD 1.5
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18505
    
  40

Too many variables in play here... it depends on the hardware, the OS, the JVM, and what the threads are doing.

It probably best to just run trials to figure out the optimal number of threads for any given setup.

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
adil qureshi
Ranch Hand

Joined: Jul 11, 2008
Posts: 48
hey i have come to know that amdahls law can help us here , do you have any suggestion ?
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18505
    
  40

adil qureshi wrote:hey i have come to know that amdahls law can help us here , do you have any suggestion ?


Well, I guess you can take a single aspect or even a few aspects, and calculate the theoretical scaling. But in general, there are too many factors to do a accurate prediction, especially if you want to scale the application to hundreds of processors.

Henry
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to identify the maximum number of threads without degrading my systems performance ?
 
Similar Threads
JVM's maximum number of Threads?
running large number of java threads
Restricting request threads in Tomcat
running large number of java threads
Servlet handling multiple clients request