SCHED_ULE(4)

πŸ’– SCHED_ULE β€” the ULE scheduler, bestie edition πŸ’–

ok so you're in the Kernel Interfaces Manual and we're talking about SCHED_ULE(4) β€” the scheduler that runs the whole show. sit down, hydrate, let's go 🫢


✨ NAME ✨

sched_ule β€” the ULE scheduler. that's it, that's the name, and it's iconic πŸ’…


✨ SYNOPSIS ✨

options SCHED_ULE

literally one line. put it in your kernel config and you're done, no cap ✨


✨ DESCRIPTION ✨

okay so the sched_ule scheduler is giving advanced scheduler features that sched_4bsd(4) β€” the traditional system scheduler β€” simply does not have. it's not a competition but… it kind of is 😭 these features are all about SMP and interactivity, and they include:

  • Thread CPU affinity. 🧡
  • CPU topology awareness, including for hyper-threading. yes it knows your cores are siblings, it's not weird about it πŸ¦‹
  • Per-CPU run queues. everybody gets their own line, no pushing 🌸
  • Interactivity heuristics that detect interactive applications and schedule them preferentially under high load. the scheduler is basically a bouncer who recognizes the VIPs πŸ‘‘

πŸŽ€ the sysctls that matter πŸŽ€

these are the sysctls relevant to how sched_ule operates. learn them, love them, they're your besties now:

  • kern.sched.name β€” this one is read-only and it reports the name of the active scheduler. it just tells you who's on aux, it does not take requests πŸ™ˆ
  • kern.sched.quantum β€” this one is read-write and it reports or sets the length of the quantum (in micro-seconds) granted to a thread. so you can peek, or you can change it. main character behaviour fr fr ⭐

✨ SEE ALSO ✨

go read them, they're part of the lore πŸ“š


✨ HISTORY ✨

the sched_ule scheduler first appeared in FreeBSD 5.1. vintage but make it fast πŸ’€βœ¨


✨ AUTHORS ✨

Jeff Roberson <jeff@FreeBSD.org> β€” thank you for your service king πŸ«ΆπŸ‘‘


ok that's the whole page bestie, you're officially educated. go schedule something πŸ’–

Debian β€” August 10, 2012 β€” SCHED_ULE(4) πŸŽ€ and that's the vibe check, we're done here, periodt πŸ’…πŸŒˆ

πŸ“¦ where this page comes from