|
|
|
|
|
by eboyjr
4771 days ago
|
|
I did find this interesting piece of information. > In a compute-bound application running on an N-processor machine, adding additional threads may improve throughput as the number of threads approaches N, but adding additional threads beyond N will do no good. Indeed, too many threads will even degrade performance because of the additional context switching overhead. The optimum size of a thread pool depends on the number of processors available and the nature of the tasks on the work queue. On an N-processor system for a work queue that will hold entirely compute-bound tasks, you will generally achieve maximum CPU utilization with a thread pool of N or N+1 threads. From http://www.ibm.com/developerworks/library/j-jtp0730/index.ht... |
|