Running on only some cores

Robert Watson rwatson at FreeBSD.org
Tue Jan 20 07:56:39 PST 2009


On Tue, 20 Jan 2009, Barney Cordoba wrote:

> Can FreeBSD be configured to only run on N cores? So for example, if I have 
> an 8 core system, can it be configured in loader.conf or through a simple 
> hack to only run on 2 cores?
>
> We're testing various configs, and its not terribly convenient to keep 
> swapping out CPUs.

You can use device.hints to disable specific CPUs using:

   hint.lapic.X.disabled=1

This prevents FreeBSD from probing the CPU.  If I had to guess, disabling the 
BSP would be a bad idea, but for the APs it should work fine. :-)

Robert N M Watson
Computer Laboratory
University of Cambridge


More information about the freebsd-current mailing list