Number of processor cores confusion

Ralf Mardorf kde.lists at yahoo.com
Mon Nov 9 18:04:58 UTC 2020


On Mon, 09 Nov 2020 12:51:37 -0500, Paul Smith wrote:
>On Mon, 2020-11-09 at 18:28 +0100, Volker Wysk wrote:
>> desktop ~ $ inxi --cpu
>> CPU:
>>   Topology: 8-Core model: AMD Ryzen 7 2700X bits: 64 type: MT MCP  
>
>There's an unfortunate terminology issue.
>
>When hardware folks talk about "cores" they mean physical cores in the
>CPU.  But, each of these cores supports "hyper threading" [1] which
>means that the Linux kernel treats each one as if it were two "cores"
>from a scheduling etc. standpoint.
>
>So when you look at the number of "cores" from within Linux it will
>look like you have 2x your hardware cores.

I often read that this can be disabled by the BIOS, at least for Intel
machines. Hyper-threading seems to be the cause of issues, if real-time
abilities are needed.

$ lscpu | head
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):                          2
On-line CPU(s) list:             0,1
Thread(s) per core:              1
Core(s) per socket:              2
Socket(s):                       1
NUMA node(s):                    1

The OP's processor should have the value 2 for "Thread(s) per core" and
8 for "Core(s) per socket", but 16 for "CPU(s)".




More information about the ubuntu-users mailing list