Odd question about the max number of supported physical processors.

saxon3049

Active Member

Reaction score: 14
Messages: 208

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

fronclynne

Daemon

Reaction score: 176
Messages: 1,296

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

This bit looked relevant to me
Code:
int mp_ncpus;
/* export this for libkvm consumers. */
int mp_maxcpus = MAXCPU;

volatile int smp_started;
u_int mp_maxid;
 

phoenix

Administrator
Staff member
Administrator
Moderator

Reaction score: 1,278
Messages: 4,099

Depends on the CPU architecture. For FreeBSD 7.2:
Code:
[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

Active Member

Reaction score: 33
Messages: 199

FreeBSD 8 BETA 3:

Code:
% 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
 
Top