System information

172 System Analysis and Tuning Guide
saturn.example.com:~ # chrt -b -p 0 16244
saturn.example.com:~ # chrt -p 16244
pid 16244's current scheduling policy: SCHED_BATCH
pid 16244's current scheduling priority: 0
For more information on chrt, see its man page (man 1 chrt).
14.4.6 Runtime Tuning with sysctl
The sysctl interface for examining and changing kernel parameters at runtime in-
troduces important variables by means of which you can change the default behavior
of the task scheduler. The syntax of the sysctl is simple, and all the following com-
mands must be entered on the command line as root.
To read a value from a kernel variable, enter
sysctl variable
To assign a value, enter
sysctl variable=value
To get a list of all scheduler related sysctl variables, enter
sysctl -A | grep "sched" | grep -v"domain"
saturn.example.com:~ # sysctl -A | grep "sched" | grep -v "domain"
kernel.sched_child_runs_first = 0
kernel.sched_min_granularity_ns = 1000000
kernel.sched_latency_ns = 5000000
kernel.sched_wakeup_granularity_ns = 1000000
kernel.sched_shares_ratelimit = 250000
kernel.sched_tunable_scaling = 1
kernel.sched_shares_thresh = 4
kernel.sched_features = 15834238
kernel.sched_migration_cost = 500000
kernel.sched_nr_migrate = 32
kernel.sched_time_avg = 1000
kernel.sched_rt_period_us = 1000000
kernel.sched_rt_runtime_us = 950000
kernel.sched_compat_yield = 0
Note that variables ending with “_ns” and “_us” accept values in nanoseconds and mi-
croseconds, respectively.