Score:0

how can i run 2 thread per core , i have 8 core and 16 threads on ubuntu

mp flag

I have an Intel i7 10700k with 8 cores and 16 threads. On Ubuntu, I see only 1 thread per core. I think there are 2 threads per core. How I can solve this problem?

This is the output of lscpu:

Architecture:                    x86_64
CPU op-mode(s):                  32-bit, 64-bit
Byte Order:                      Little Endian
Address sizes:                   39 bits physical, 48 bits virtual
CPU(s):                          8
On-line CPU(s) list:             0-7
Thread(s) per core:              1
Core(s) per socket:              8
Socket(s):                       1
NUMA node(s):                    1
Vendor ID:                       GenuineIntel
CPU family:                      6
Model:                           165
Model name:                      Intel(R) Core(TM) i7-10700K CPU @ 3.80GHz
Stepping:                        5
CPU MHz:                         3792.008
BogoMIPS:                        7584.01
Hypervisor vendor:               KVM
Virtualization type:             full
L1d cache:                       256 KiB
L1i cache:                       256 KiB
L2 cache:                        2 MiB
L3 cache:                        128 MiB
in flag
Is SMP (also called HyperThreading) enabled in your UEFI?
ChanganAuto avatar
us flag
https://www.intel.com/content/www/us/en/products/sku/199335/intel-core-i710700k-processor-16m-cache-up-to-5-10-ghz/specifications.html -> Indeed 8 cores, 16 threads. That, however, doesn't mean all software can take advantage of it.
Score:0
it flag

Do not think all applications can take advantage of too many cores CPUs. You just don't have 2 threads by cores. looking on your description, I guess here your motherboard is limited on that so additional threads are ignored. I had a machine with that same type of limitation few years ago

Most of them just let the operating system manage that, depending on hardware & bios setup of course.

You can still optimize your runs on software-side

If you are sure, there is no setup/hardware issues, use taskset or similar tool.

You can "force" applications to run on a dedicated pool of cores using taskset

example :

 taskset -cp 4-8 firefox 

Of course if the application uses only one core/thread, only the first one of the pool you defined is used by that application.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.