如何在 Yakkety 服务器中启用 256+ 个内核

hif*_*fly 4 server kernel intel multi-core 16.10

Yakkety 服务器使用通用内核风格。它是 4.8.0 Linux 内核。

在 Intel KNL 处理器上运行时,我看不到 256 以上的内核。

user@ubuntu02:~$ grep processor /proc/cpuinfo | wc -l
256
Run Code Online (Sandbox Code Playgroud)

dmidecode 显示内核的实数

user@ubuntu02:~$ sudo dmidecode -t 4
[sudo] password for user:
# dmidecode 3.0
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x001B, DMI type 4, 48 bytes
Processor Information
    Socket Designation: CPU0
    Type: Central Processor
    Family: Xeon
    Manufacturer: Intel(R) Corporation
    ID: 71 06 05 00 FF FB EB BF
    Signature: Type 0, Family 6, Model 87, Stepping 1
    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)
            DS (Debug store)
            ACPI (ACPI supported)
            MMX (MMX technology supported)
            FXSR (FXSAVE and FXSTOR instructions supported)
            SSE (Streaming SIMD extensions)
            SSE2 (Streaming SIMD extensions 2)
            SS (Self-snoop)
            HTT (Multi-threading)
            TM (Thermal monitor supported)
            PBE (Pending break enabled)
    Version: Intel(R) Xeon Phi(TM) Processor 000A @ 1.40GHz
    Voltage: 0.9 V
    External Clock: 100 MHz
    Max Speed: 4000 MHz
    Current Speed: 1400 MHz
    Status: Populated, Enabled
    Upgrade: <OUT OF SPEC>
    L1 Cache Handle: 0x0019
    L2 Cache Handle: 0x001A
    L3 Cache Handle: Not Provided
    Serial Number: To Be Filled By O.E.M.
    Asset Tag: To Be Filled By O.E.M.
    Part Number: To Be Filled By O.E.M.
    Core Count: 68
    Core Enabled: 68
    Thread Count: 272
    Characteristics:
            64-bit capable
            Multi-Core
            Hardware Thread
            Execute Protection
            Power/Performance Control
Run Code Online (Sandbox Code Playgroud)

是否可以在不重新编译内核的情况下启用所有 272 个内核?

user@ubuntu02:~$ grep CONFIG_NR_CPUS /boot/config-4.8.0-32-generic
CONFIG_NR_CPUS=256
Run Code Online (Sandbox Code Playgroud)

我认为 Ubuntu Server 内核风格应该已经准备好了。

Col*_*ing 5

最近在 Yakkety 内核中 cpu 数量增加到 512,并将登陆内核版本 Ubuntu-4.8.0-34.35:

commit 4cc43dc6b3bf9ea5b9ed6d91af47dbe137a71cd9
Author: Luis Henriques <luis.henriques@canonical.com>
Date:   Thu Dec 8 10:36:14 2016 +0000

    UBUNTU: [Config] Increase the NR_CPUS to 512 for amd64 to support systems with a large number of cores.

    BugLink: http://bugs.launchpad.net/bugs/1579205

    Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
    Acked-by: Colin Ian King <colin.king@canonical.com>
    Acked-by: Tim Gardner <tim.gardner@canonical.com>
Run Code Online (Sandbox Code Playgroud)

因此,如果您没有运行该内核,请更新并获得此修复程序。