Linux scheduler (9) -- Scheduler configuration parameters

Source: Internet
Author: User

Configuration parameters of the Scheduler

/Proc/sys/kernel/sched_min_granularity_ns (4001_ns): sysctl_sched_min_granularity, which indicates the minimum running time of processes and prevents frequent switching. for interactive systems (such as desktops ), this value can be set to a small value to ensure faster response to interactions (see the check_preempt_tick process of the periodic Scheduler)

/Proc/sys/kernel/sched_latency_ns (20001_ns): sysctl_sched_latency indicates the cycle in which all processes in a running queue run once, which is related to the number of processes in the running queue, if the number of processes exceeds sched_nr_latency (this variable cannot be set through/proc, it is composed of (sysctl_sched_latency +
Sysctl_sched_min_granularity-1)/latency determined), then the scheduling cycle is sched_min_granularity_ns * run the number of processes in the queue, and has nothing to do with sysctl_sched_latency; otherwise the number of queue processes is less than sched_nr_latency, the run cycle is Sy. Obviously, the smaller the number, the less sched_nr_latency supported by a running queue, and the more sched_nr_latency supported when sysctl_sched_min_granularity is smaller, the less time each process can execute in this cycle, which is consistent with the above discussion of the sysctl_sched_min_granularity variable. In fact, sched_nr_latency can also be used as our CPU
The baseline value of load. If the CPU load is greater than this value, the CPU usage is insufficient.

/Proc/sys/kernel/sched_features (3183d = 110001101111b): sysctl_sched_features. This variable indicates the features supported by the scheduler, such as gentle_fair_sleepers (smooth compensatory sleep process ), start_debit (the new process should be scheduled as early as possible), wakeup_preempt (whether the wakeup process can seize the currently running process), and so on. For all features, see the definition in the sech_features.h file of the kernel.

/Proc/sys/kernel/sched_wakeup_granularity_ns (400366ns): sysctl_sched_wakeup_granularity. This variable indicates the base of the minimum running time after the process is awakened, it is only used to determine whether a process should seize the current process, does not represent the minimum time it can be executed (sysctl_sched_min_granularity), if the value is smaller, the probability of preemption is higher (see the functions wakeup_gran and wakeup_preempt_entity)

/Proc/sys/kernel/sched_child_runs_first (0): sysctl_sched_child_runs_first. This variable indicates whether to allow the child process to seize the parent process when creating the child process, this will reduce the fairness, but reduce write_on_copy. The specific method should be considered based on the system's application (see task_fork_fair process)

/Proc/sys/kernel/sched_cfs_bandwidth_slice_us (5000us): sysctl_sched_cfs_bandwidth_slice

/Proc/sys/kernel/sched_rt_period_us (kernel 00us): sysctl_sched_rt_period. This parameter, together with the following sysctl_sched_rt_runtime, determines the time when the real-time process is in the cycle, the maximum time that a real-time process can run cannot exceed sysctl_sched_rt_runtime (for the code, see sched_rt_global_constraints)

/Proc/sys/kernel/sched_rt_runtime_us (950000us): sysctl_sched_rt_runtime. See the description of the variable sysctl_sched_rt_period.

/Proc/sys/kernel/sched_compat_yield (0): sysctl_sched_compat_yield. This parameter makes the sched_yield () system call more effective and enables it to use fewer CPUs, for applications that rely on sched_yield for better performance, consider setting it to 1.

/Proc/sys/kernel/sched_migration_cost (500000ns): sysctl_sched_migration_cost this variable is used to determine whether a process is still hot. If the running time (now-p-> se.exe c_start) is less, so the kernel thinks its code is still in the cache, so the process is still hot, so it will not be considered during migration.

/Proc/sys/kernel/sched_nr_migrate (32): sysctl_sched_nr_migrate

/Proc/sys/kernel/sched_tunable_scaling (1): kernel. The update method used when the kernel tries to adjust the values sched_min_granularity, sched_latency, and sched_wakeup_granularity. The value 0 is not adjusted, 1 is to adjust the number of CPUs based on 2, and 2 is to adjust the linear proportion according to the number of CPUs

References:

Http://doc.opensuse.org/documentation/html/openSUSE/opensuse-tuning/cha.tuning.taskscheduler.html

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.