firelzrd/bore-scheduler

How does BORE scheduler go along with the linux-zen patches?

mabod opened this issue · 6 comments

mabod commented

I am currently looking into linux-tkg kernel. They provide a config option for the BORE scheduler as well as for the linux-zen kernel patches to modify CFS settings.

linux-zen aims to improve latency and responsiveness of the CFS kernel. And so does the BORE scheduler. Should they both be applied? What is the recommendation?

Hi there.

In my understanding, to the CFS scheduler, Zen is a series of modification of tuning knobs.
It does not change CFS's algorithms.

BORE is a modification to CFS's algorithm.

I have never read through the Zen patch, or talked to the tkg team about their patches, so I do not know exactly why tkg provides two different options, but here's my guess:

Zen modifies CFS in some of the sysctl tuning knobs. So does BORE.
So the tkg team left the user which patch's values to adopt.

mabod commented

Your reply indicates to me that I should better use BORE without the ZEN patches. Because BORE is already optimized for low latency in itself.

I want you to keep in your mind that what I've said applies to CFS tunables only.
"Zen Interactive Tuning" includes a lot more than just CFS tuning, so if tkg incorporates the whole Zen patchset not just scheduler-wise, and if you prefer responsiveness over throughput, then you probably should also opt in to include Zen, not only BORE.

mabod commented

From what I see tkg is only including "interactivity" variables from ZEN.
Like

sysctl_sched_idle_min_granularity
sched_nr_latency
sysctl_sched_cfs_bandwidth_slice
etc.

So I will stop using that for kernels with the BORE scheduler.

You can also just test these settings if they suit to you.
@firelzrd made a little tool, to switch between the CFS sysctl values with some presets:
https://github.com/CachyOS/CachyOS-Settings/blob/master/usr/bin/tunecfs2

Be sure you have ruby installed when you use it.

Hi @mabod,

I think bore scheduler should be able to work with zen patches together, as long as you do one of the following:

  1. Apply the full bore scheduler patch and the zen patch without zen-kernel/zen-kernel@8fcf775
  2. Apply the bore scheduler patch without sysctl and the full zen patch

You can test which option works better for your workload.