While studying the kernel behaviour from RHEL6 to RHEL7, we came across an explanation on RHEL6 kernel parameters:
sched_min_granularity_ns is the initial value for the scheduler period. The scheduler period is a period of time during which all runnable tasks should be allowed to run at least once. While CFS has no concept of time slices, you can think of the period as the initial chunk of time which is then divided evenly into timeslices, one for each runnable process. Note that this tunable only specifies the initial value. When too many tasks become runnable the scheduler will increase the period to avoid shortening run times too much.
It configures targeted preemption latency for CPU bound tasks.
The description regarding the
kernel.sched_min_granularity_ns parameter confused us. Our understanding of the parameter is that it is the minimum amount of time for which each runnable task would run on the CPU (i.e. time-slice provided to each runnable task). For
kernel.sched_latency_ns, it is the period during which all runnable task(s) would run at least once.
We derive our understanding from many other articles, such as this one and that one. Some links might refer to a different kernel version, but the general description of the parameter shouldn't become reversed.