1

According to this post, there are three kernel parameters for controlling process scheduler:

kernel.sched_min_granularity_ns
kernel.sched_latency_ns
kernel.sched_wakeup_granularity_ns

However, on my system which is Ubuntu, I don't see them. Instead, the following variables exist:

$ sudo sysctl -A | grep sched
kernel.sched_autogroup_enabled = 1
kernel.sched_cfs_bandwidth_slice_us = 5000
kernel.sched_child_runs_first = 0
kernel.sched_deadline_period_max_us = 4194304
kernel.sched_deadline_period_min_us = 100
kernel.sched_energy_aware = 1
kernel.sched_rr_timeslice_ms = 100
kernel.sched_rt_period_us = 1000000
kernel.sched_rt_runtime_us = 950000
kernel.sched_schedstats = 0
kernel.sched_util_clamp_max = 1024
kernel.sched_util_clamp_min = 1024
kernel.sched_util_clamp_min_rt_default = 1024
$ uname -r
5.13.0-27-generic

The question is, should I set them manually or they are replaced with some other variables?

mahmood
  • 1,211
  • If you want to change associated value and keys just exist as sysctls, why would you look for a better way than using /sbin/sysctl -w ? – MC68020 Apr 09 '22 at 17:23
  • Sorry I didn't get your comment. Problem is that those variables no longer exist in sysctl. Also, it is not sched_min_granularity_ns, but it is min_granularity_ns. – mahmood Apr 09 '22 at 17:29

1 Answers1

1

https://forum.endeavouros.com/t/sysctl-output-changed-from-kernel-5-10-to-5-13-why/17097 says they have been moved to /sys/kernel/debug/sched

David B
  • 41
  • OK I see /sys/kernel/debug/sched/min_granularity_ns. Does that mean the correct command to change that is sysctl min_granularity_ns=1000? In the link it is written that sysctl no longer sees that variable. So, I wonder how to change that? – mahmood Apr 09 '22 at 15:00
  • can you try something like this: # echo 2250000 > /sys/kernel/debug/sched/min_granularity_ns – David B Apr 09 '22 at 17:17