1

I have been trying to understand lscpu's output and came across several threads dedicated to concepts of CPUs, physical cores, and threads. Based on those threads, to get the total number of CPUs (logical units), you would do the following: Thread(s) per core x Core(s) per socket x Socket(s).

Given the partial output from my machine shown below, I would expect CPU(s) to be 28, but it is listed as 20.

Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  20
  On-line CPU(s) list:   0-19
Vendor ID:               GenuineIntel
  Model name:            12th Gen Intel(R) Core(TM) i9-12900H
    CPU family:          6
    Model:               154
    Thread(s) per core:  2
    Core(s) per socket:  14
    Socket(s):           1

Can someone help me to understand the apparent disconnect between my expectation for the CPU count and what lscpu actually produced in this instance? I can't seem to find similar cases.

1 Answer 1

0

The information you’ve found (including perhaps my previous answers on the topic) doesn’t take into account CPUs with different cores in a single package. Your CPU has six P cores and eight E cores; each P core has two threads, so in total your system has twenty logical CPUs.

lscpu can’t represent that in its summary (at least, not the version you have), so it shows misleading information; you can see the different cores by running lscpu --extended.

1
  • That helps, and to confirm, I found the suggestion to run lscpu --all --extended, which generates output consistent with your comment. Commented Jan 26, 2024 at 19:04

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.