Difference between revisions of "OS: Tuning Completely Fair scheduler CFS"

From OnnoWiki
Jump to navigation Jump to search
Line 2: Line 2:
  
  
The Linux Completely Fair scheduler (CFS) includes parameters that you can adjust to fit your specific needs.
+
Dalam Linux Completely Fair scheduler (CFS) terdapat parameter yang dapat kita atur untuk menyesuaikan dengan kebutuhan kita.
  
 
The following parameters can be accessed through the proc file system. The default values (in nanoseconds) of these parameters from SLES 11 SP1 are shown in parentheses.
 
The following parameters can be accessed through the proc file system. The default values (in nanoseconds) of these parameters from SLES 11 SP1 are shown in parentheses.
Line 12: Line 12:
 
To verify the value of each parameter, use the following command:
 
To verify the value of each parameter, use the following command:
  
# cat /proc/sys/kernel/sched_latency_ns
+
# cat /proc/sys/kernel/sched_latency_ns
  
 
To modify the value of each parameter, use the following command:
 
To modify the value of each parameter, use the following command:
  
# echo 20000 > /proc/sys/kernel/sched_latency_ns
+
# echo 20000 > /proc/sys/kernel/sched_latency_ns
  
 
In the test environment, best results were achieved with the following values for these three parameters:
 
In the test environment, best results were achieved with the following values for these three parameters:
  
kernel.sched_min_granularity_ns = 100000
+
kernel.sched_min_granularity_ns = 100000
kernel.sched_wakeup_granularity_ns = 25000
+
kernel.sched_wakeup_granularity_ns = 25000
kernel.sched_latency_ns = 1000000
+
kernel.sched_latency_ns = 1000000
  
 
If you want to make these changes permanent, you can modify these parameters in the /etc/sysctl.conf file and run the sysctl -p command.
 
If you want to make these changes permanent, you can modify these parameters in the /etc/sysctl.conf file and run the sysctl -p command.
 
 
 
 
  
  

Revision as of 11:12, 31 March 2013

Sumber: http://publib.boulder.ibm.com/infocenter/lnxinfo/v3r0m0/index.jsp?topic=%2Fliaai%2Fsaptuning%2Fsaptuningadjust.htm


Dalam Linux Completely Fair scheduler (CFS) terdapat parameter yang dapat kita atur untuk menyesuaikan dengan kebutuhan kita.

The following parameters can be accessed through the proc file system. The default values (in nanoseconds) of these parameters from SLES 11 SP1 are shown in parentheses.

   sched_min_granularity_ns (16000000): Minimum preemption granularity for processor-bound tasks. Tasks are guaranteed to run for this minimum time before they are preempted.
   sched_latency_ns (80000000): Period over which CFQ tries to fairly schedule the tasks on the runqueue. All of the tasks on the runqueue are guaranteed to be scheduled once within this period.
   sched_wakeup_granularity_ns (20000000): Ability of tasks being woken to preempt the current task. The smaller the value, the easier it is for the task to force the preemption.

To verify the value of each parameter, use the following command:

# cat /proc/sys/kernel/sched_latency_ns

To modify the value of each parameter, use the following command:

# echo 20000 > /proc/sys/kernel/sched_latency_ns

In the test environment, best results were achieved with the following values for these three parameters:

kernel.sched_min_granularity_ns = 100000
kernel.sched_wakeup_granularity_ns = 25000
kernel.sched_latency_ns = 1000000

If you want to make these changes permanent, you can modify these parameters in the /etc/sysctl.conf file and run the sysctl -p command.


Referensi

Pranala Menarik