# Max # of CPU's



## Ronaldr (Apr 14, 2010)

Hello All,

Im currently running a few quad core based FreeBSD machines for webservers and the like. Im looking to upgrade to some better hardware because of high loads. Im wondering what the max # of CPU's are ? Also is the any reason to pick Intel over AMD (freebsd reason's) ?

-Thanks in Advance


----------



## phoenix (Apr 14, 2010)

From the source tree for FreeBSD 8-STABLE:

```
amd64/include/param.h:#define MAXCPU            32
arm/include/param.h:#define     MAXCPU          2
i386/include/param.h:#define MAXCPU             32
ia64/include/param.h:#define    MAXCPU          32
powerpc/include/param.h:#define MAXCPU          2
sparc64/include/param.h:#define MAXCPU          16
sun4v/include/param.h:#define MAXCPU            32
```

So, you stick 4x 8-core x86 CPUs into a single server, and max them all out.


----------



## User23 (Apr 14, 2010)

Ronaldr said:
			
		

> Also is the any reason to pick Intel over AMD (freebsd reason's) ?



We using both AMD and Intel systems with FreeBSD. I really like AMD but i must say a Intel CPU with a Intel chipset works a bit more stable with FreeBSD, if  we talk about 2 socket systems with registered ECC DIMMs.
I hope the new chipset from AMD works better than the NVIDIA "crap".


----------



## User23 (Apr 14, 2010)

phoenix said:
			
		

> So, you stick 4x 8-core x86 CPUs into a single server, and max them all out.



Well 2x 8core Xeon X6550 with 16 (HT)Threads are enough


----------



## vermaden (Apr 14, 2010)

@phoenix

Seems that we are now pretty limited as AMD started shipping Opteron CPUs with 12 cores, so You can create 48 core server with 4 of them, I am curious if this can be overriden by only putting 48 under #define MAXCPU


----------



## phoenix (Apr 14, 2010)

A kernel dev will have to answer that.  Some quick googling doesn't turn up anything more recent than 2006 mailing list threads about changing the MAXCPU value to 32.


----------



## tekkon (Apr 18, 2010)

Is the MAXCPU value defined for physical CPU cores or does it apply to logical cores/(HT)threads too?


----------



## mav@ (Apr 19, 2010)

It is for logical cores. Most parts of the system do not differentiate kind of CPUs.

AFAIR it was told somewhere that for 64bit archs it should be possible to rise it up to 64 without much troubles, except increased memory consumption. It just wasn't tested due to lack of such systems. Further increase will probably require some architectural changes.


----------



## frooyo (Dec 23, 2011)

phoenix said:
			
		

> From the source tree for FreeBSD 8-STABLE:
> 
> ```
> amd64/include/param.h:#define MAXCPU            32
> ...



With* FreeBSD 9* upon us, has the maximum # of cores FreeBSD can support changed?

If I read this commit correctly, it sounds like there is NO maximum core/cpu limit anymore. Is that correct?


----------



## mav@ (Dec 23, 2011)

It was increased to 64 for 64bit archs, and if you need more, you need just to build custom kernel specifying it.


----------



## frooyo (Dec 23, 2011)

mav@ said:
			
		

> It was increased to 64 for 64bit archs, and if you need more, you need just to build custom kernel specifying it.



Why only 64 cores when in the code commit it states it can do much more (128):

Excerpt from code commit: _"Please additively note that no MAXCPU is bumped in this patch, but
private testing has been done until to MAXCPU=128 on a real 8x8x2(htt)
machine (amd64)."_​


----------



## mav@ (Dec 23, 2011)

Probably just to keep mask of CPUs still fitting into single CPU register. Before 9.0 it was requirement, now it is just an optimization. Machines with more then 64 CPUs are still rare.


----------

