Tunable Parts of the Scheduler

team bbl


The scheduler has a number of tunable parameters that can be used to do different things, such as improve the response of interactive tasks, increase the timeslice for high-priority tasks, and penalize a parent for creating processor hogs.

The remaining sections of this chapter list and describe the tunable parameters of the scheduler and the likely effects when the value of the tunable is increased or decreased.

*CHILD_PENALTY

Description: The value of this parameter is the percentage of the parent's sleep average that a child inherits.

Effect: Increasing the value of this parameter increases the child's effective priority, making it more interactive and giving it higher importance during scheduling. Decreasing the value has the opposite effect. This parameter has no effect on the parent's sleep average.

*CREDIT_LIMIT

Description: This is the number of times a task earns sleep_avg over MAX_SLEEP_AVG and is then considered highly interactive. After that point, the task is penalized less for its sleep_avg, thereby providing much less response time. On the other hand, CPU hogs earn negative credit and are given a limited increase in their priority levels for their sleep.

Effect: Reducing the value of this parameter helps highly interactive tasks by raising them to the highly interactive level, and decreasing has the opposite effect.

The 2.6 version of the kernel has multiple tunable parameters that can be altered to improve the performance of the Linux system as needed by the user.

*EXIT_WEIGHT

Description: This parameter determines whether the parent is penalized for creating children that are processor hogs relative to the parent. The sleep average of the parent is modified depending on the sleep average of the child and the value of this parameter.

Effect: Setting this value to zero causes the parent to inherit the child's sleep average when the child exits. Increasing the value of this parameter reduces the effect of the child's sleep average on the parent.

*INTERACTIVE_DELTA

Description: The value of this parameter determines the offset that is added in determining whether or not a task is considered interactive. A task needs to be considered interactive for it to be put back in the active array when its timeslice has expired.

Effect: If this parameter is increased, a task needs to accumulate a larger sleep average to be considered interactive. Decreasing the value of this parameter has the opposite effect.

*MAX_SLEEP_AVG

Description: The value of this parameter is the maximum sleep average a task can accumulate for the purposes of calculating the scheduling bonus. A task with this sleep average gets the maximum bonus as indicated by PRIO_BONUS_RATIO.

Effect: If the value of this parameter is increased, tasks need to accumulate a larger sleep average to get the same priority bonus. Decreasing the value has the opposite effect.

*MAX_TIMESLICE

Description: The value of this parameter is the timeslice that is allocated to the task with the highest static priority (MAX_RT_PRIO).

Effect: Increasing the value of this parameter gives the highest-priority task more time for execution before it is rescheduled. Decreasing the value of this parameter has the opposite effect.

*MIN_TIMESLICE

Description: The value of this parameter is the timeslice that is allocated to the task with the lowest static priority (MAX_PRIO-1).

Effect: Increasing the value of this parameter gives the lowest-priority task more time for execution before it is rescheduled. Decreasing the value of this parameter has the opposite effect.

*PARENT_PENALTY

Description: This is the percentage of the sleep average that the parent is permitted to keep.

Effect: Decreasing this parameter penalizes the parent for creating more children by reducing its effective priority. This parameter has no effect on the child's sleep average.

*PRIO_BONUS_RATIO

Description: The value of this parameter specifies the percentage of the priority range used to provide a temporary bonus to interactive tasks.

Effect: Increasing the value of this parameter gives interactive tasks more bonuses and processor hogs more penalties. Decreasing the value has the opposite effect. For example, for a PRIO_BONUS_RATIO of 25%[12.5..12.5%], the priority range would be [5..4]. Consider a task with 'nice=0'(static priority 120). If the sleep average is 0 for this task, a penalty of 5 is imposed, resulting in an effective priority of 125. On the other hand, if the sleep average of this task is MAX_SLEEP_AVG(=10 seconds), a bonus of 5 is granted, leading to an effective priority of 115. In no case can the effective priority go lower than 20 or exceed 19, even with this temporary bonus applied.

*STARVATION_LIMIT

Description: This is the multiplication factor used to decide whether an interactive task is placed in an active or expired array, to avoid starvation of the tasks in the expired array. If the first expired task is waiting for more than STARVATION_LIMIT(=10seconds) times the number of tasks in the run queue, the interactive task is placed in the expired array.

Effect: Increasing the value of this parameter helps interactive tasks by keeping them in the active array at the expense of starving noninteractive tasks, even if the static priorities of the noninteractive tasks are high. Decreasing the value moves the interactive tasks to the expired array faster and might affect their response.

    team bbl



    Performance Tuning for Linux Servers
    Performance Tuning for Linux Servers
    ISBN: 0137136285
    EAN: 2147483647
    Year: 2006
    Pages: 254

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net