I am new to parallel computing and this may be a trivial question. I am thinking about which processor to choose for parallel computing (on a single machine)? In particular, I would like to know whether I should aim for a high number (physical) cores or a high number of threads?
I am working with R (package parallel
) on Windows. Typically, the datasets are not large, so the limit is not the memory but the number and duration of independent processes run on the data.
I understood that parallel
makes use of logical cores (i.e., hardware threads) but that such threads do not work truly in parallel because they share “execution resources” https://en.wikipedia.org/wiki/Hyper-threading. So, would e.g., 4 (physical) cores with 1 thread each result in more speed (throughput) than 2 (physical) cores with 2 threads each (i.e., 4 logical cores)?
Suggestions on specific processors are also more than welcome.
For memory or I/O intensive workloads, a HT enabled processor provides better performance and power efficiency, at lower cost. For compute intensive workloads, possible gain due to additional logical threads reduces. Your application seems to be compute intensive. If that is the only kind of workload the system has to execute, you can look for system with higher number of physical core processors.
The problem is there are limited number of processor which doesn't support logical threads. Most of the processor from Intel support Hyper-threading. Cost of with and without HT processors is not very different. With a HT enabled processor a system can handle more diverse workloads. It can multitask more efficiently.
It is possible to disable HT by configuring the BIOS.