Re: Periodic rant about SCHED_ULE

From: Gary Jennejohn <>
Date: Wed, 7 Jul 2021 20:18:35 +0200
On Wed, 7 Jul 2021 13:47:47 -0400
George Mitchell <> wrote:

> CPU: AMD Ryzen 5 2600X Six-Core Processor (3600.10-MHz K8-class CPU)
> (12 threads).
> FreeBSD 12.2-RELEASE-p7 r369865 GENERIC  amd64 (SCHED_ULE) vs
> FreeBSD 12.2-RELEASE-p7 r369865 M5P  amd64 (SCHED_4BSD).
> Comparing "make buildworld" time with misc/dnetc running vs not running.
> (misc/dnetc is your basic 100% compute-bound task, running at nice 20.)
> Three out of the four combinations build in roughly four hours, but
> SCHED_ULE with dnetc running takes close to twelve!  (And that was
> overnight with basically nothing else running.)  This is an even
> worse disparity than I have seen in previous releases.
> Based on my total lack of an exact understanding of how loadable
> kernel modules work, I nevertheless hypothesize that it should be
> possible for the scheduler to be a loadable kernel module, given that
> the interface to the schedule seems to have been carefully thought out
> and scrupulously observed by both ULE and 4BSD.  Perhaps the system
> could start with a dummy scheduler that is just barely functional
> enough to get the appropriate module loaded and have it supersede the
> dummy scheduler?  Then switching between the schedulers would become
> much less of a hassle than it is currently.  Why, if it is configurable,
> it could even be compatible with freebsd-update!
> I've been ranting about this for years now, and I've had my say -- but
> no one has ever answered my question about what workload SCHED_ULE is
> best for, though numerous people have claimed that it's better than
> SCHED_4BSD for -- some rumored workload or other.          -- George

IIRC there was talk about making the scheduler loadable in the early
days.  But that was years ago and I may be misrembering.

I have a Ryzen 5 1600 with 6 cores, so older tech and "only" 3200MHz.

I can do a clean buildworld on FreeBSD-14 using only 10 of the 12 SMTs
in about 40 minutes using SCHED_4BSD.  While still browsing the
interwebs or watching a film etc.  with no noticeable lags in

So, for my normal desktop usage SCHED_4BSD is the only way to go.

Gary Jennejohn
Received on Wed Jul 07 2021 - 18:18:35 UTC

Original text of this message