Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.
1697 Discussions

Why the number of cores and number of threads are different in the specifications?

fatalme
Beginner
313 Views
http://ark.intel.com/Product.aspx?id=47916
There are 6 cores while there are 12 threads. If using openmp, is there any performance difference if I create 6 threads and create 12 threads?
Thanks.
0 Kudos
1 Reply
TimP
Honored Contributor III
313 Views
It would require a fairly unusual workload for OpenMP to gain an advantage by running 2 threads per core. It's possible, particularly if you can set affinity so that pairs of threads get an advantage by sharing data in cache. Intel OpenMP will use all 12 logical processors by default, but will not set the necessary affinity by default. The documentation for Intel MKL library explains why that library tries to avoid running 2 threads per core.
I have benchmarks where the performance of Xeon 5680 (in the normal configuration of 2 CPUs, 12 cores total) gets peak OpenMP performance with 8 threads, with affinity set to use only the 8 independent cores. More typically, going from 4 to 6 threads per CPU can give 20% performance increase. The one thing you can be sure of when leaving HyperThreading active is that affinity setting is critical.
0 Kudos
Reply