dmidecode 和 GNU parallel 看不到核心

dmidecode 和 GNU parallel 看不到核心

我们正在从 Ubuntu 18.04 升级到 22.04m5a.大号AWS 系统(两个 vCPU)。我们安装了GNU 并行来自 Ubuntu 仓库。

在 Ubuntu 18.04 上:

# parallel --number-of-cores
2

在 Ubuntu 22.04 上:

# parallel --number-of-cores
1

再次强调,这两者都m5a.大号实例(2 个 vCPU)。

知道为什么并行无法识别第二个 CPU 吗?

有关 Ubuntu 22.04 系统的更多数据。大多数系统显示 2 个核心,但有些系统只显示 1 个核心。例如:

lscpu显示 2 个 CPU:

# lscpu | egrep CPU
CPU op-mode(s):                     32-bit, 64-bit
CPU(s):                             2
On-line CPU(s) list:                0,1
CPU family:                         23
NUMA node0 CPU(s):                  0,1

/proc/cpuinfo显示2:

# cat /proc/cpuinfo |egrep processor
processor       : 0
processor       : 1

nproc显示2:

# nproc
2

dmidecode仅显示1:

# dmidecode -t processor | egrep -i "cpu|core"
        Socket Designation: CPU 0
        Core Count: 1
        Core Enabled: 1
                Multi-Core

getconf显示2:

# getconf _NPROCESSORS_ONLN
2

更新:如下所述,完整的 cpuinfo 和 lscpu。

cpuinfo:
processor       : 0
vendor_id       : AuthenticAMD
cpu family      : 23
model           : 1
model name      : AMD EPYC 7571
stepping        : 2
microcode       : 0x800126e
cpu MHz         : 2199.738
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 0
initial apicid  : 0
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch topoext vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr arat npt nrip_save
bugs            : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass retbleed smt_rsb srso div0
bogomips        : 4399.47
TLB size        : 2560 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management:

processor       : 1
vendor_id       : AuthenticAMD
cpu family      : 23
model           : 1
model name      : AMD EPYC 7571
stepping        : 2
microcode       : 0x800126e
cpu MHz         : 2199.738
cache size      : 512 KB
physical id     : 0
siblings        : 2
core id         : 0
cpu cores       : 1
apicid          : 1
initial apicid  : 1
fpu             : yes
fpu_exception   : yes
cpuid level     : 13
wp              : yes
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy abm sse4a misalignsse 3dnowprefetch topoext vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr arat npt nrip_save
bugs            : sysret_ss_attrs null_seg spectre_v1 spectre_v2 spec_store_bypass retbleed smt_rsb srso div0
bogomips        : 4399.47
TLB size        : 2560 4K pages
clflush size    : 64
cache_alignment : 64
address sizes   : 48 bits physical, 48 bits virtual
power management:

lscppu:

Architecture:            x86_64   CPU op-mode(s):        32-bit, 64-bit   Address sizes:         48 bits physical, 48 bits virtual   Byte Order:            Little Endian CPU(s):                  2   On-line CPU(s) list:   0,1 Vendor ID:               AuthenticAMD   Model name:            AMD EPYC 7571
    CPU family:          23
    Model:               1
    Thread(s) per core:  2
    Core(s) per socket:  1
    Socket(s):           1
    Stepping:            2
    BogoMIPS:            4399.47
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nons
                         top_tsc cpuid extd_apicid aperfmperf tsc_known_freq pni pclmulqdq ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm cmp_legacy cr8_legacy ab
                         m sse4a misalignsse 3dnowprefetch topoext vmmcall fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 clzero xsaveerptr arat npt nrip_save Virtualization features:    Hypervisor vendor:     KVM   Virtualization type:   full Caches (sum of all):        L1d:           32 KiB (1 instance)   L1i:                   64 KiB (1 instance)   L2: 512 KiB (1 instance)   L3:                    8 MiB (1 instance) NUMA: NUMA node(s):          1   NUMA node0 CPU(s):     0,1 Vulnerabilities: Gather data sampling:  Not affected   Itlb multihit:         Not affected   L1tf:                  Not affected   Mds:                  Not affected   Meltdown:              Not affected   Mmio stale data:  Not affected   Retbleed:              Mitigation; untrained return thunk; SMT vulnerable   Spec rstack overflow:  Mitigation; safe RET, no microcode   Spec store bypass:     Vulnerable   Spectre v1:         Mitigation; usercopy/swapgs barriers and __user pointer sanitization   Spectre v2:            Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected   Srbds:                 Not affected   Tsx async abort:       Not affected

但我认为真正的问题在于 dmidecode,它只显示一个 CPU。dmidecode -t 处理器

# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 2.7 present.

Handle 0x0004, DMI type 4, 42 bytes
Processor Information
        Socket Designation: CPU 0
        Type: Central Processor
        Family: Zen
        Manufacturer: Advanced Micro Devices, Inc.
        ID: 12 0F 80 00 FF FB 8B 17
        Signature: Family 23, Model 1, Stepping 2
        Flags:
                FPU (Floating-point unit on-chip)
                VME (Virtual mode extension)
                DE (Debugging extension)
                PSE (Page size extension)
                TSC (Time stamp counter)
                MSR (Model specific registers)
                PAE (Physical address extension)
                MCE (Machine check exception)
                CX8 (CMPXCHG8 instruction supported)
                APIC (On-chip APIC hardware supported)
                SEP (Fast system call)
                MTRR (Memory type range registers)
                PGE (Page global enable)
                MCA (Machine check architecture)
                CMOV (Conditional move instruction supported)
                PAT (Page attribute table)
                PSE-36 (36-bit page size extension)
                CLFSH (CLFLUSH instruction supported)
                MMX (MMX technology supported)
                FXSR (FXSAVE and FXSTOR instructions supported)
                SSE (Streaming SIMD extensions)
                SSE2 (Streaming SIMD extensions 2)
                HTT (Multi-threading)
        Version: AMD EPYC 7571
        Voltage: 1.0 V
        External Clock: 100 MHz
        Max Speed: 3000 MHz
        Current Speed: 2200 MHz
        Status: Populated, Enabled
        Upgrade: Socket SP3
        L1 Cache Handle: 0x0005
        L2 Cache Handle: 0x0006
        L3 Cache Handle: 0x0007
        Serial Number: Not Specified
        Asset Tag: Not Specified
        Part Number: Not Specified
        Core Count: 1
        Core Enabled: 1
        Thread Count: 2
        Characteristics:
                64-bit capable
                Multi-Core
                Hardware Thread
                Execute Protection

相关内容