Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mabod opened this issue Jan 24, 2023 · 6 comments
Closed

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

mabod opened this issue Jan 24, 2023 · 6 comments

Comments

@mabod
Copy link

mabod commented Jan 24, 2023

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?

@firelzrd
Copy link
Owner

firelzrd commented Jan 25, 2023

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
Copy link
Author

mabod commented Jan 25, 2023

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.

@firelzrd
Copy link
Owner

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
Copy link
Author

mabod commented Jan 25, 2023

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.

@ptr1337
Copy link

ptr1337 commented Jan 25, 2023

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.

@raykzhao
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants