To SMP or not to SMP

Erich Dollansky erichsfreebsdlist at alogt.com
Wed Jan 9 14:14:45 UTC 2013


Hi,

On Wed, 9 Jan 2013 05:40:13 -0800 (PST)
Barney Cordoba <barney_cordoba at yahoo.com> wrote:

> --- On Wed, 1/9/13, Erich Dollansky <erichsfreebsdlist at alogt.com>
> wrote:
> > From: Erich Dollansky <erichsfreebsdlist at alogt.com>
> > Subject: Re: To SMP or not to SMP
> > To: "Mark Atkinson" <atkin901 at gmail.com>
> > Cc: freebsd-net at freebsd.org
> > Date: Wednesday, January 9, 2013, 1:01 AM
> > Hi,
> > 
> > On Tue, 08 Jan 2013 08:29:51 -0800
> > Mark Atkinson <atkin901 at gmail.com>
> > wrote:
> > 
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > > 
> > > On 01/07/2013 18:25, Barney Cordoba wrote:
> > > > I have a situation where I have to run 9.1 on an
> > old single core
> > > > box. Does anyone have a handle on whether it's
> > better to build a
> > > > non SMP kernel or to just use a standard SMP build
> > with just the
> > > > one core? Thanks.
> > > 
> > > You can build a SMP kernel, but you'll get better
> > performance (in my
> > > experience) with SCHED_4BSD on single cpu than with
> > ULE.
> > > 
> > I would not say so. The machine behaves different with the
> > two
> > schedulers. It depends mostly what you want to do with the
> > machine. I
> > forgot which scheduler I finally left in the single CPU
> > kernel.
> > 
> > Erich
> 
> 4BSD runs pretty well with an SMP kernel. I can test ULE and compare
> easily. A no SMP kernel is problematic as the igb driver doesn't seem
> to work and my onboard NICs are, sadly, igb. 
> 
this is bad luck. I know of the kernels as I have had SMP and single
CPU machines since 4.x times.

> Rather than say "depends what you want to do", perhaps an explanation
> of which cases you might choose one or the other would be helpful.
> 
> So can anyone in the know confirm that the kernel really isn't smart
> enough to know there there's only 1 core so that most of the SMP

The kernel does not think like this. It is a fixed program flow.

> "overhead" is avoided? It seems to me that SMP scheduling should only
> be enabled if there is more than 1 core as part of the scheduler
> initialization. Its arrogant indeed to assume that just because SMP
> support is compiled in that there are multiple cores.

I compile my own kernels and set the parameters as needed.

Erich


More information about the freebsd-net mailing list