New Linux OS Scheduler Reduces Lag by Keeping Light Work on Fewer CPU Cores

Nest OS Scheduler
(Image credit: LPC.Events)

According to a report by Phoronix, a new CPU scheduler is being developed for Linux operating systems that decreases system latency and improves performance in low load scenarios. The new scheduler, known as Nest, is designed to focus lightly threaded workloads towards as few processing cores as possible, in an effort to keep boost frequencies at their peak for as long as possible.

This strategy is a large departure from most CPU schedulers being used today, which are optimized for multi-core saturation. This strategy is great in theory, since it evenly distributes as many tasks to as many cores as possible, but due to architectural deficiencies in modern CPUs, this strategy isn't the best use of CPU resources.

Clock speed behavior on modern microchip processors has changed drastically over the past decade. In the past, all you really had was a single base clock speed the chip would  for low, medium and heavy applications, along with a very simple turbo boosting algorithm that would engage a specific frequency in medium or heavy workloads as long as there was enough thermal and power headroom to spare.

But nowadays, CPU frequency behavior has become a lot more complicated, with chips being able to run at a near infinite amount of differing clock speeds, along with several tiers of sleep states the cores can enter when underutilized. 

These new features are amazing at increasing efficiency, but they can introduce unwanted lag that is caused by delays in CPU clock speed adjustments. A CPU can't wake from sleep instantaneously; it needs some time to wake up. 

Nest address these problems by prioritizing the most recently used cores in a system that are already running at peak turbo clock speeds from previous work done. This way, Nest can keep feeding work to cores that are already operating at their highest operating clocks to counter any clock speed adjustment delays and keep CPU performance as high as possible.

Nest does this by "nesting" cores that it knows are actively being used or recently were used, and believes these cores will be useful in the near future. Nest does this with two clusters it calls the "Primary Nest" and the "Reserve Nest". The Primary Nest is where all the active cores and predicted active cores reside for light to moderate workloads. The Reserve Nest is where all the unused cores are located.

Nest will actively add or remove cores from the Primary Nest when necessary and focus all light and moderate work onto these cores. It will even ping some of the cores to ensure they don't go to sleep if there is a slight moment of downtime. Nest will only bring cores residing in the reserve nest into the primary nest if the active cores are cannot do the work efficiently or at all.

Basically, Nest is smart enough to know which cores it thinks will be useful in the near future, for future work. Nest has been reportedly provide a 10% to 2x performance increase in light to moderate workloads in AMD desktops, AMD servers and Intel servers.

It will be interesting to see how this scheduler plays out on Linux. Technically Windows 10 and 11 has some of this behavior for AMD Ryzen processors, where the task scheduler will prioritize specific physical cores for lightly threaded workloads. But Nest appears to be a far more advanced and capable scheduler, that acts much more fluidly and isn't limited by the properties of specific cores.

Hopefully we'll get to see it in action one day soon in a real world Linux system, but for now, it is still being researched.

Aaron Klotz
Freelance News Writer

Aaron Klotz is a freelance writer for Tom’s Hardware US, covering news topics related to computer hardware such as CPUs, and graphics cards.

  • Megangel1
    " The Reserve Nest is where all the unused cores are located. " Nope, it is where cores previously in the Primary nest but haven't been used for a while are put. Other unused cores are not in either nest.
    Reply
  • svavar79
    Hopefully this will open up support for efficiency cores like those found in recent Intel laptop CPUs.
    Reply
  • TJ Hooker
    svavar79 said:
    Hopefully this will open up support for efficiency cores like those found in recent Intel laptop CPUs.
    As an FYI, it's not just their mobile CPUs that have Efficiency cores. Many Intel Alder Lake desktop chips have them as well. And they've been supported by Linux for months now (as long as you're running a recent kernel version).
    Reply
  • washmc
    TJ Hooker said:
    As an FYI, it's not just their mobile CPUs that have Efficiency cores. Many Intel Alder Lake desktop chips have them as well. And they've been supported by Linux for months now (as long as you're running a recent kernel version).
    Also I believe this is a completely separate issue being addressed by other means than what this article is describing. E-core usage should be getting addressed as we speak, whereas Nest is I believe a further down the line concept.
    Reply
  • TerryLaze
    svavar79 said:
    Hopefully this will open up support for efficiency cores like those found in recent Intel laptop CPUs.
    This is mostly for ryzen cpus and older intel cpus, in general cpus that have turbo tables and boost to different clocks depending on how many cores are under load.
    On such cpus the lower the amount of cores doing work the higher the clocks on these cores so the less lag you get.

    We have come to the point that we have so many cores on main stream systems that the OS has to take steps to counter-act.
    Reply