How many cores can Linux kernel handle?

At least 2048 in practice. As a concrete example, SGI sells its UV system, which can use 256 sockets (2,048 cores) and 16TB of shared memory, all running under a single kernel. I know that there are at least a few systems that have been sold in this configuration.

According to SGI:

Altix UV runs completely unmodified Linux, including standard distributions from both Novell and Red Hat.


this is what Launchpad has to say about Ubuntu, so I guess it applies to others:

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.

That is 32 or 64 CPUs for x86 and x86_64 respectively.

Redhat says the same, but in a management-friendly table. Redhat EL6 can do 32 for x86, or 128 or 4096 CPUs cores for x86_64.


The x86_64 Linux kernel can handle a maximum of 4096 Processor threads in a single system image. This means that with hyper threading enabled, the maximum number of processor cores is 2048. Yes there is computers with more than 2048 processor cores; but these runs as clusters where several Linux kernels cooperate, connected with a high speed interconnect, typically an Infiniband fabric.

from the most current kernel 3.13, in ~/arch/x86/Kconfig :

config 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.

Update: On newer kernels this is architecture specific - for example on 4.15 x86_64 allows you to set NR_CPUS to 8192 in the right circumstances whereas 32 bit arm stops at 32.

Tags:

Linux

Kernel