Linux内核可以处理多少个内核?

tsh*_*ang 16 linux kernel

我对理论限制感兴趣,也许是具有大量 CPU 的系统示例。

Kei*_*thB 18

在实践中至少为 2048。作为一个具体的例子,SGI 出售其UV系统,该系统可以使用 256 个套接字(2,048 个内核)和 16TB 的共享内存,所有这些都在单个内核下运行。我知道至少有一些系统以这种配置出售。

根据 SGI:

Altix UV 运行完全未经修改的 Linux,包括来自 Novell 和 Red Hat 的标准发行版。


gbj*_*anb 11

这就是 Launchpad对 Ubuntu 的看法,所以我想它适用于其他人:

1.Intel x86:
Maximum CPUs: 32 (including logical CPUs)
Maximum memory: 64GB
Maximum filesize: 8TB
Maximum filesystem size (ext3) 16TB
Maximum per-process virtual address space: 4GB

2.AMD64/EM64T:
Maximum CPUs: 64
Maximum memory: 128GB
Maximum filesize: 8TB
Maximum filesystem size (ext3): 16TB
Maximum per-process virtual address space: N/A

These are standard max limitations whereas Linux cluster systems can scale up to 1024 CPU's.
Run Code Online (Sandbox Code Playgroud)

x86 和 x86_64 分别是 32 或 64 个 CPU。

Redhat 也这么说,但在管理友好的表中。Redhat EL6 可以为 x86 执行 32 个内核,或者为 x86_64 执行 128 或 4096 个 CPU 内核。

  • [arch/x86/Kconfig](http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=arch/x86/Kconfig;hb=HEAD ) 表示如果启用了`CONFIG_MAXSMP`,可以提高这些`CONFIG_NR_CPUS` 限制。 (4认同)

小智 6

x86_64 Linux 内核在单个系统映像中最多可以处理 4096 个处理器线程。这意味着启用超线程后,处理器内核的最大数量为 2048。是的,有超过 2048 个处理器内核的计算机;但是它们作为集群运行,其中多个 Linux 内核协作,通过高速互连(通常是 Infiniband 结构)连接。

从最新的内核 3.13 开始,在 ~/arch/x86/Kconfig 中:

配置 NR_CPUS

    ---help---
      This allows you to specify the maximum number of CPUs which this
      kernel will support.  If CPUMASK_OFFSTACK is enabled, the maximum
      supported value is 4096, otherwise the maximum value is 512.  The
      minimum value which makes sense is 2.

      This is purely to save memory - each supported CPU adds
      approximately eight kilobytes to the kernel image.
Run Code Online (Sandbox Code Playgroud)

更新:在较新的内核上,这是特定于架构的 - 例如在 4.15 x86_64 上,您可以在正确的情况下将 NR_CPUS 设置为 819232 位 arm 停止在 32