21.02.2013 Views

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

AIX 5L Problem Determination - IBM Redbooks

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

schedtune limitations<br />

The schedtune command can only be executed by root. Changes made by the<br />

schedtune command last until the next reboot of the system. If a permanent<br />

change in VMM or time-slice parameters is needed, an appropriate schedtune<br />

command should be put in the /etc/inittab file.<br />

schedtune example one<br />

The following command will result in SCHED_R = 0 and SCHED_D = 0.5:<br />

# /usr/samples/kernel/schedtune -r 0<br />

This would mean that the CPU penalty was always 0, making priority absolute.<br />

No background process would get any CPU time unless there were no<br />

dispatchable foreground processes at all, as background processes in ksh are<br />

started with adding 4 to the nice value of the parent shell. The priority values of<br />

the threads would effectively be constant, although they would not technically be<br />

fixed-priority threads.<br />

schedtune example two<br />

The following command would result in an effective SCHED_R = 1 and<br />

SCHED_D = 1:<br />

# /usr/samples/kernel/schedtune -r 32 -d 32<br />

This would mean that long-running threads would reach a C value of 120 and<br />

remain there, contending on the basis of their nice values. New threads would<br />

have priority, regardless of their nice value, until they had accumulated enough<br />

time slices to bring them within the priority value range of the existing threads.<br />

schedtune example three<br />

The most likely reason to manipulate the values would be to make sure that<br />

background processes do not compete with foreground processes. By making<br />

SCHED_R smaller, you can restrict the range of possible priority values. For<br />

example:<br />

# /usr/samples/kernel/schedtune -r 5<br />

(SCHED_R = 0.15625, SCHED_D = 0.5) would mean that a foreground process<br />

would never have to compete with a background process started with the<br />

command nice -n 20. The limit of 120 CPU time slices accumulated would mean<br />

that the maximum CPU penalty for the foreground process would be 18. In<br />

Figure 10-2 on page 257, this relationship is graphically shown. Because the<br />

CPU penalty will get a maximum value of 18, the foreground process with a nice<br />

value of 20 will always, when it needs, get CPU. On the other hand, the<br />

background process, with a nice value of 40, will use CPU only when the<br />

foreground process does not need the CPU.<br />

256 <strong>IBM</strong> ^ Certification Study Guide - <strong>AIX</strong> <strong>5L</strong> <strong>Problem</strong> <strong>Determination</strong> Tools and Techniques

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!