# Odd question about the max number of supported physical processors.



## saxon3049 (Sep 2, 2009)

How many physical processor cores can FreeBSD support? I know there has to be a upper limit but where is FreeBSD's?


----------



## fronclynne (Sep 2, 2009)

Uh, I'm no C guru, but does /usr/src/sys/kern/subr_smp.c say?

This bit looked relevant to me

```
int mp_ncpus;
/* export this for libkvm consumers. */
int mp_maxcpus = MAXCPU;

volatile int smp_started;
u_int mp_maxid;
```


----------



## phoenix (Sep 2, 2009)

Depends on the CPU architecture.  For FreeBSD 7.2:

```
[fcash@rogue /usr/src/sys]$ find . -maxdepth 3 -type f -name param.h -print -exec grep -B1 -A1 MAXCPU {} \;
./i386/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          16
#else
#define MAXCPU          1
#endif /* SMP */
./pc98/include/param.h
./sparc64/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          16
#else
#define MAXCPU          1
#endif /* SMP */
./sys/param.h
./ia64/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          4
#else
#define MAXCPU          1
#endif
./powerpc/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          2
#else
#define MAXCPU          1
#endif /* SMP */
./amd64/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          16
#else
#define MAXCPU          1
#endif
./arm/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          2
#else
#define MAXCPU          1
#endif /* SMP */
./sun4v/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          32
#else
#define MAXCPU          1
#endif /* SMP */
```

So it ranges from 1-32 CPU cores.  It may be higher on 8.0.


----------



## pbd (Sep 2, 2009)

FreeBSD 8 BETA 3:


```
% find /usr/src/sys -maxdepth 3 -type f -name param.h -print -exec grep -B1 -A1 MAXCPU {} \; 
./amd64/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          32
#else
#define MAXCPU          1
#endif
./arm/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          2
#else
#define MAXCPU          1
#endif /* SMP || KLD_MODULE */
./i386/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          32
#else
#define MAXCPU          1
#endif /* SMP || KLD_MODULE */
./ia64/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          4
#else
#define MAXCPU          1
#endif
./pc98/include/param.h
./powerpc/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          2
#else
#define MAXCPU          1
#endif /* SMP || KLD_MODULE */
./sparc64/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          16
#else
#define MAXCPU          1
#endif /* SMP || KLD_MODULE */
./sun4v/include/param.h
#if defined(SMP) || defined(KLD_MODULE)
#define MAXCPU          32
#else
#define MAXCPU          1
#endif /* SMP || KLD_MODULE */
./sys/param.h
./mips/include/param.h
#define MAXSMPCPU       16
#define MAXCPU          MAXSMPCPU
#else
#define MAXSMPCPU       1
#define MAXCPU          1
#endif
```


----------

