0
I am using a program (*) under unix/linux (various flavours) on various servers and clusters, the program supports multithreading. I can specificy how many threads I want via command line option.
Generally speaking, how can I determine how many threads I should specify for the multithreading (to get maximum speed)?
Should the number of threads be lower / equal to the number of hardware threads the respective CPU supports? Is there any rule-of-thumb or starting point?
If yes, how can I find out how many hardware threads a CPU supports?
I should also mention that the computers I run this typically on, have multiple CPUs, each with several cores. Unclear if one core = one thread.
(*) The program I use is bwa, a program for aligning DNA sequences. But my question is general in nature.
Thanks, this provides very good points for reasoning. Just to add: in my case I actually do have (a few hundred) long running, memory-hungry threads. – None – 2013-10-10T09:34:20.103