linux scheduler (IX) - configuration parameter scheduler

Original link: https://blog.csdn.net/wudongxu/article/details/8574753 (refer to detail the remaining related articles)

 

Configuration parameter scheduler

/ Proc / sys / kernel / sched_min_granularity_ns (4000000ns): sysctl_sched_min_granularity, the process represents a minimum operating time, to prevent frequent switching, for interactive systems (e.g., the desktop), which value may be set to be small, so that the interaction can be obtained to ensure a faster response (check_preempt_tick see process cycle scheduler)

/ Proc / sys / kernel / sched_latency_ns (20000000ns): sysctl_sched_latency, represents a running time of cycle queue all the processes running, the current that the number of processes run queue, and if the number of processes exceeds sched_nr_latency (This variable can not / proc setting, it yes, then the scheduling period is the number of sched_min_granularity_ns * run queue process, independent of the (sysctl_sched_latency + sysctl_sched_min_granularity-1) / sysctl_sched_min_granularity determined) and sysctl_sched_latency; otherwise, the process is less than the number of queues sched_nr_latency, run cycle is sysctl_sched_latency. Obviously the smaller the number, the less a run queue support sched_nr_latency, and when more sysctl_sched_min_granularity more hours to support the sched_nr_latency, then the time for each process can be performed during this period is also less, which is variable and above sysctl_sched_min_granularity discussion of the same. In fact, sched_nr_latency can also be used as our benchmark cpu load value, if the cpu load greater than this value, then that is not enough to use the cpu

/ Proc / sys / kernel / sched_features (3183d = 110001101111b): sysctl_sched_features, which variable represents the scheduler supports features such as GENTLE_FAIR_SLEEPERS (smooth compensation sleeping process), START_DEBIT (new process possible early scheduling), WAKEUP_PREEMPT (whether wakeup of process can go to preempt the currently running process), all of the features defined in the kernel file sech_features.h

/ Proc / sys / kernel / sched_wakeup_granularity_ns (4000000ns): sysctl_sched_wakeup_granularity, the variable represents the base after the process is awakened should at least run time, it is only used to determine whether a process should seize the current process, it does not mean it can be executed the minimum time (sysctl_sched_min_granularity), if this value is smaller, the higher the probability of occurrence of preemption (see wakeup_gran, wakeup_preempt_entity function)

/ Proc / sys / kernel / sched_child_runs_first (0): sysctl_sched_child_runs_first, the variable indicates when creating the child process of whether to allow the child to seize the parent process, even if vruntime parent process is less than the child process, this will reduce the equity, but can reduce write_on_copy , to consider specific to the application of the system according to which way (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 (1000000us): sysctl_sched_rt_period, the parameter and the following sysctl_sched_rt_runtime decide together the real-time process in order to sysctl_sched_rt_period cycle time, real-time processes can run up to a total of no longer than sysctl_sched_rt_runtime (see the code sched_rt_global_constraints )

/ Proc / sys / kernel / sched_rt_runtime_us (950000us): sysctl_sched_rt_runtime, supra sysctl_sched_rt_period variable interpretation

/ Proc / sys / kernel / sched_compat_yield (0): sysctl_sched_compat_yield, this parameter allows sched_yield () system calls more efficiently, so that it uses less cpu, application for those who rely sched_yield to get better performance as it may consider setting 1

/ Proc / sys / kernel / sched_migration_cost (500000ns): sysctl_sched_migration_cost the variable used to determine whether a process is still hot, if the process of running time (now - p-> se.exec_start) is less than it, the kernel code still think it's in cache, so the process is still hot, then when the migration would not consider it

/ Proc / sys / kernel / sched_nr_migrate (32): sysctl_sched_nr_migrate, when load balancing in a multi-CPU case, a number of processes to move up to another CPU

/ Proc / sys / kernel / sched_tunable_scaling (1): sysctl_sched_tunable_scaling, update method is used, 0 for no adjustment when trying to adjust the kernel sched_min_granularity, sched_latency sched_wakeup_granularity and when these three values, according to the number 1 for the base 2 cpu adjusting the value, 2 is adjusted according to the number of linearly proportional to the cpu


----------------
Disclaimer: This article is the original article CSDN bloggers "wudongxu", and follow CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement. .
Original link: https: //blog.csdn.net/wudongxu/article/details/8574753

Guess you like

Origin www.cnblogs.com/lh03061238/p/12297255.html