Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>As documented in <a href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/block/switching-sched.txt;hb=HEAD" rel="noreferrer"><code>/usr/src/linux/Documentation/block/switching-sched.txt</code></a>, the I/O scheduler on any particular block device can be changed at runtime. There may be some latency as the previous scheduler's requests are all flushed before bringing the new scheduler into use, but it can be changed without problems even while the device is under heavy use.</p> <pre><code># cat /sys/block/hda/queue/scheduler noop deadline [cfq] # echo anticipatory &gt; /sys/block/hda/queue/scheduler # cat /sys/block/hda/queue/scheduler noop [deadline] cfq </code></pre> <p>Ideally, there would be a single scheduler to satisfy all needs. It doesn't seem to exist yet. The kernel often doesn't have enough knowledge to choose the best scheduler for your workload:</p> <ul> <li><code>noop</code> is often the best choice for memory-backed block devices (e.g. ramdisks) and other non-rotational media (flash) where trying to reschedule I/O is a waste of resources</li> <li><code>deadline</code> is a lightweight scheduler which tries to put a hard limit on latency</li> <li><code>cfq</code> tries to maintain system-wide fairness of I/O bandwidth</li> </ul> <p>The default was <code>anticipatory</code> for a long time, and it received a lot of tuning, but was removed in <strong>2.6.33</strong> (early 2010). <code>cfq</code> became the default some while ago, as its performance is reasonable and fairness is a good goal for multi-user systems (and even single-user desktops). For some scenarios -- databases are often used as examples, as they tend to already have their own peculiar scheduling and access patterns, and are often the <em>most</em> important service (so who cares about fairness?) -- <code>anticipatory</code> has a long history of being tunable for best performance on these workloads, and <code>deadline</code> very quickly passes all requests through to the underlying device.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload