Section 9.7. Scheduler Options


9.7. Scheduler Options

These options tweak the parameters used to make scheduling decisions. Most depend on an intimate understanding of how scheduling works in Linux.


Isolate CPUs from the kernel scheduler.


isolcpus= cpu_number[, cpu_number,...]

Remove the specified CPUs, as defined by the cpu_number values, from the general kernel SMP balancing and scheduler algroithms. The only way to move a process onto or off an "isolated" CPU is via the CPU affinity syscalls. cpu_number begins at 0, so the maximum value is one less than the number of CPUs on the system.

This option is the preferred way to isolate CPUs. The alternative, manually setting the CPU mask of all tasks in the system, can cause problems and suboptimal load-balancer performance.


Override the default scheduler migrations costs.


migration_cost= level-1-useconds[level-2-useconds...]

This is a debugging option that overrides the default scheduler migration cost matrix. The numbers specified by level-N-useconds are indexed by the "CPU domain distance" and are measured in microseconds.

An example of this option is migration_cost=1000,2000,3000 for a SMT NUMA machine. It sets up an intra-core migration cost of 1 ms, another inter-core migration cost of 2 ms, and another internode migration cost of 3 ms.

Incorrect values can severely degrade scheduler performance, so this option should be used only for scheduler development, never for production environments.



Verbosity of migration cost autodetection.


migration_debug=[0|1|2]

Set the migration cost debug level. If 0 is specified, no extra messages will be printed to the kernel log. This is the default value. 1 prints some information on how the matrix is determined. 2 is very verbose and is useful only if you use a serial console, as the amount of information will overflow the kernel log buffer.


Multiply or divide the migration costs.


migration_factor= percent

Modify the default migration costs by the specified percent. This is a debugging option that can be used to proportionally increase or decrease the autodetected migration costs for all entries of the migration matrix. For example, migration_factor=150 increases migration costs by 50 percent, so the scheduler will be less eager to migrate cache-hot tasks. migration_factor=80 decreases migration costs by 20 percent, thus making the scheduler more eager to migrate tasks.

Incorrect values can severely degrade scheduler performance, so this option should be used only for scheduler development, never for production environments.




Linux Kernel in a Nutshell
Linux Kernel in a Nutshell (In a Nutshell (OReilly))
ISBN: 0596100795
EAN: 2147483647
Year: 2004
Pages: 113

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