# Maximum number of CPUs

## Xywa

Hi,

There is an option in kernel: Maximum number of CPUs (CONFIG_NR_CPUS) - what is the proper setting for Intel i5 - 2 or 4?

----------

## roarinelk

Set it to 16 -- this way you're future proofed for octo-i5 variants with HT ;-)

All this option does is set the size of the array which contains CPU data;

setting it low doesn't save any significant amount of RAM or speed up the

kernel.

----------

## kite14

I set it to 4; i5 are dual-core CPUs with support for HyperThreading and according to Pappy's comment on his Kernel Seed Settings page:

 *Quote:*   

> (xx) Maximum number of CPUs
> 
> This setting was put in the seed for the purposes of seeing who was awake, and who was asleep at the wheel. Since each CPU claimed takes up approximately eight kilobytes in kernel image size, it's wise to change this number to match the true number of processors in your system. The default setting is ridiculous.

 

----------

## upengan78

Mine is set to 4096

cat /etc/kernels/kernel-config-x86_64-3.3.8-gentoo | grep CONFIG_NR_CPUS

CONFIG_NR_CPUS=4096

I have i7-8 cores 4GB memory.

----------

## eccerr0r

I think you'll have to check the specs of the CPU carefully but setting it to something like 8 or 16 should always be safe.  Probably 32 would be the highest reasonable number for most consumer products.  Setting it higher just wastes even more memory.

i5's I thought were pure cores, no HT.  i3 has HT but lacks all cores.  i7 has real cores and HT...  Basically need to set the number of CPUs to how many threads the processor looks like to to the machine.

Some of the settings I used:

My i7-2700K: 8 cores (4 cores, HT)  With 8G I could spare the RAM but likely I don't think I'll get another CPU for this board...

My Q9550S: 4 cores (4 cores, no HT) 4GB.  I don't think there is a HT quad core socket 775...

My E6700: 4 cores (2 cores, no HT) 4GB.  This is futureproofing in case I stick a Core2 Quad into this machine.

My Atom N270: 2 cores (1 core, HT).  2GB.  Solderred CPU...

You can always recompile later if you want anyway...

----------

