11

I think this is kernel dependent and probably will change over time depending on the kernel a release uses, correct me if wrong

I'd like to know two things for all the currently supported Ubuntu releases:

How many maximum CPUs can Ubuntu handle (by default) at the same time with a standard desktop kernel? Is that count different from a server kernel and 32bit/64bit systems?

Where can I find that information on my system?

Braiam
  • 69,302
Bruno Pereira
  • 74,785

3 Answers3

18

Maximum CPUs (i.e. cores) supported by default:

Note: by 32-bit/64-bit we mean the common i386/x86_x64 architectures; PPC, ARM, etc. are not included.

12.04 LTS (and later):

  • Desktop/Server 32-bit: 8 cores/CPUs
  • Desktop/Server 64-bit: 256 cores/CPUs (but LiveCD supports 64 by default)

11.10 and below, including 10.04 LTS

  • Desktop/Server 32-bit: 8 cores/CPUs
  • Desktop 64-bit: 64 cores/CPUs
  • Server 64-bit: 256 cores/CPUs

How to find the maximum supported by your running kernel:

As @otus indicated, open a terminal with Ctrl-Alt-T, and type:

grep NR_CPUS /boot/config-`uname -r`

The below is a somewhat technical discussion on what maximum really means:

The "default" maximum is not the maximum!

  • You can recompile the desktop or server kernels to support up to 512 CPUs for 64-bit (8 is max for 32-bit).
  • but even those are not absolute maximums!:
    • The kernel has "experimental" options for going higher than the "default" maximum
    • The limit for 32-bit with BIGSMP=y is 512
    • The limit for 64-bit with MAXSMP=y is 4096 (or more!)
    • Just because the kernel supports so many cores on the general i386/x86_64 architecture does not mean your hardware will!
ish
  • 142,198
  • I found an Excellent Link here, but i am not sure about which kernel versions started supporting SMP and incrementing the CPU's , i hope you can include and make it a much detailed and better answer through this. Also SMP support started from Ubuntu 10.04 , as here. – atenz Jul 02 '12 at 12:12
  • @izx I have edited the title to reflect a more Ubuntu information approach. I am really looking for something that wee can redirect questions like "Does Ubuntu support my X processors system" to this one. – Bruno Pereira Jul 02 '12 at 12:14
  • @BrunoPereira, many thanks for clarifying -- I have updated to "top-post" the necessary info, while including the tech stuff at the bottom for those interested; I will continue to refine in the next few hours to be more newbie-friendly :) – ish Jul 02 '12 at 12:21
  • @izx pro! good job again. regards – Bruno Pereira Jul 02 '12 at 12:26
  • in Ubuntu 20.04 it seems you can use dmesg | grep NR_CPU which gives me [ 0.677263] setup_percpu: NR_CPUS:8192 nr_cpumask_bits:128 nr_cpu_ids:128 nr_node_ids:1 [ 0.916164] rcu: RCU restricting CPUs from NR_CPUS=8192 to nr_cpu_ids=128. – hanshenrik Jun 09 '22 at 07:15
4

All I know for sure is that precise (12.04) desktop 64-bit -generic kernel supports maximum 256 cpus (by default).

You can find the number of CPUs your kernel config supports by doing:

grep CONFIG_NR_CPUS /boot/config-`uname -r`
ish
  • 142,198
otus
  • 873
2

It all comes down to how one would define physical CPUs. Are they equivalent to sockets, so a multicore and/or hyperthreading CPU is counted as a single socket?

The Ubuntu kernel is configured to support 8 processors / cores in 32-bit and 64 processors / cores in 64-bit.1

As far as finding that information, I have used Sysinfo and I'm very happy with it. If you don't have it installed, you can do so by just pressing Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get install sysinfo

Also to find the Number of processors in a system using terminal, just type:

dmesg |grep processor

I will keep researching this until I find the perfect answer.

1Source:Wiki Answers

Mitch
  • 109,937
  • This goes to all releases that haven't reached it's EOL? – Bruno Pereira Jul 02 '12 at 08:51
  • This seems like outdated information. Starting with Ubuntu 12.04, the desktop and server kernels are the same. Many server machines have more than 8 processors/cores (and this has been the case for quite some time). It seems implausible that the single kernel, now used in both server and desktop systems, supports only up to 8 logical processors. – Eliah Kagan Jul 02 '12 at 08:52
  • @EliahKagan Is the number the same for 32, and 64 bit? – Mitch Jul 02 '12 at 09:18
  • 1
    @BrunoPereira, Mitch: No. I think it's 8 on 32-bit systems. I have a machine running Ubuntu 12.04 LTS 32-bit and the output of grep CONFIG_NR_CPUS /boot/config-$(uname -r) is CONFIG_NR_CPUS=8. There aren't too many 32-bit systems that run high-end servers or have more than 8 logical processors these days (though I expect that to change again once low-power systems become more parallel), so this makes sense. If I had info on all the non-EoL releases I'd post an answer, but I don't, at least not currently. Definitely feel free to include this info! – Eliah Kagan Jul 02 '12 at 09:23
  • @BrunoPereira, Eliahkagan, Does this look better, I have deleted the out dated info that you mentioned Eliah. – Mitch Jul 02 '12 at 09:27
  • 1
    @EliahKagan it was a typo. But if it 8 logical, then its 64 cores, right? – Mitch Jul 02 '12 at 09:30
  • @Mitch The newly updated information (that 32-bit versions can support up to 64 cores) indicates NR_CPUS is the number of separate physical processors supported rather than the number of cores. In reflection, that does seem correct. I do recommend editing to specify the number of separate processors and the number of cores in your answer, though. – Eliah Kagan Jul 02 '12 at 09:32
  • @EliahKagan A sigle processor with multiple cores is still treated as logical processors. – Mitch Jul 02 '12 at 09:39
  • Isn't true that, the Linux kernel can be compiled to support any number of CPUs. – Mitch Jul 02 '12 at 09:44