0

What I have always understood is that a CPU can have multiple cores, but a core can only belong to one CPU. The information I found on the Internet also shows this. But when I use lscpu --extend, it shows that multiple CPUs belong to a core? The following shows the data I used lscpu --extend on my linux server. Does this show that both cpu0 and cpu24 belong to core 0?

    CPU NODE SOCKET CORE L1d:L1i:L2:L3 ONLINE MAXMHZ    MINMHZ
    0   0    0      0    0:0:0:0       是     2900.0000 1200.0000
    1   1    1      1    1:1:1:1       是     2900.0000 1200.0000
    2   0    0      2    2:2:2:0       是     2900.0000 1200.0000
    3   1    1      3    3:3:3:1       是     2900.0000 1200.0000
    4   0    0      4    4:4:4:0       是     2900.0000 1200.0000
    5   1    1      5    5:5:5:1       是     2900.0000 1200.0000
    6   0    0      6    6:6:6:0       是     2900.0000 1200.0000
    7   1    1      7    7:7:7:1       是     2900.0000 1200.0000
    8   0    0      8    8:8:8:0       是     2900.0000 1200.0000
    9   1    1      9    9:9:9:1       是     2900.0000 1200.0000
    10  0    0      10   10:10:10:0    是     2900.0000 1200.0000
    11  1    1      11   11:11:11:1    是     2900.0000 1200.0000
    12  0    0      12   12:12:12:0    是     2900.0000 1200.0000
    13  1    1      13   13:13:13:1    是     2900.0000 1200.0000
    14  0    0      14   14:14:14:0    是     2900.0000 1200.0000
    15  1    1      15   15:15:15:1    是     2900.0000 1200.0000
    16  0    0      16   16:16:16:0    是     2900.0000 1200.0000
    17  1    1      17   17:17:17:1    是     2900.0000 1200.0000
    18  0    0      18   18:18:18:0    是     2900.0000 1200.0000
    19  1    1      19   19:19:19:1    是     2900.0000 1200.0000
    20  0    0      20   20:20:20:0    是     2900.0000 1200.0000
    21  1    1      21   21:21:21:1    是     2900.0000 1200.0000
    22  0    0      22   22:22:22:0    是     2900.0000 1200.0000
    23  1    1      23   23:23:23:1    是     2900.0000 1200.0000
    24  0    0      0    0:0:0:0       是     2900.0000 1200.0000
    25  1    1      1    1:1:1:1       是     2900.0000 1200.0000
    26  0    0      2    2:2:2:0       是     2900.0000 1200.0000
    27  1    1      3    3:3:3:1       是     2900.0000 1200.0000
    28  0    0      4    4:4:4:0       是     2900.0000 1200.0000
    29  1    1      5    5:5:5:1       是     2900.0000 1200.0000
    30  0    0      6    6:6:6:0       是     2900.0000 1200.0000
    31  1    1      7    7:7:7:1       是     2900.0000 1200.0000
    32  0    0      8    8:8:8:0       是     2900.0000 1200.0000
    33  1    1      9    9:9:9:1       是     2900.0000 1200.0000
    34  0    0      10   10:10:10:0    是     2900.0000 1200.0000
    35  1    1      11   11:11:11:1    是     2900.0000 1200.0000
    36  0    0      12   12:12:12:0    是     2900.0000 1200.0000
    37  1    1      13   13:13:13:1    是     2900.0000 1200.0000
    38  0    0      14   14:14:14:0    是     2900.0000 1200.0000
    39  1    1      15   15:15:15:1    是     2900.0000 1200.0000
    40  0    0      16   16:16:16:0    是     2900.0000 1200.0000
    41  1    1      17   17:17:17:1    是     2900.0000 1200.0000
    42  0    0      18   18:18:18:0    是     2900.0000 1200.0000
    43  1    1      19   19:19:19:1    是     2900.0000 1200.0000
    44  0    0      20   20:20:20:0    是     2900.0000 1200.0000
    45  1    1      21   21:21:21:1    是     2900.0000 1200.0000
    46  0    0      22   22:22:22:0    是     2900.0000 1200.0000
    47  1    1      23   23:23:23:1    是     2900.0000 1200.0000
Gerrie
  • 146

1 Answers1

3

Some of the terminology is strange but yes.

I think that in this output Socket means CPU. Core means core of a CPU (Socket). So there can be a core 0 of socket 0 and a core 0 of socket 1.

Node is a numa node, so you have two devices networked together as a cluster.

And CPU means distinct core: one for socket 0 core 0 and another for socket 1 core 0.

However I think you are correct. CPU n and n+24 seem the same. On my lap top I get

0   0    0      0    0:0:0:0       yes    2000.0000 500.0000
1   0    0      1    1:1:1:0       yes    2000.0000 500.0000
2   0    0      0    0:0:0:0       yes    2000.0000 500.0000
3   0    0      1    1:1:1:0       yes    2000.0000 500.0000

A similar sort of result. I know this device has 1 Socket (CPU), and 2 Cores, but 4 hyper threads. Therefore I am thinking that each CPU is a hyper-thread (not a real independent core).

output from lscpu

...
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  2
Socket(s):           1
NUMA node(s):        1
...
  • Columns in the --extended output are definitely incorrectly named from what it seems. – Artem S. Tashkinov Nov 21 '20 at 11:40
  • 1
    @ArtemS.Tashkinov they are just different. A core is a CPU, and that is how it is named here. Socket is the name of a package containing CPUs (cores). Hyperthreading adds to the confusion, by increasing the number of logical cores, without changing the number of physical cores. – ctrl-alt-delor Nov 21 '20 at 11:43
  • Too bad while lscpu's man includes once the word "thread", there's no extended option to display a "thread" column which can then be misleading if one doesn't think about this. – A.B Nov 21 '20 at 12:33
  • Adding to the mess, AMD-s chiplet architecture is like additional layer of NUMA nodes inside sockets... I can imagine heterogeneous cores and accelerators will add even more mess. – Ott Toomet Nov 22 '20 at 02:37