kernel scheduler (was Ubuntu 8.10 significantly slower than previous versions)

John Dong jdong at ubuntu.com
Mon Nov 10 00:16:19 UTC 2008


As listed, the choices are noop, anticipatory, deadline, and cfq.

Kernel gurus look away as I try to explain this, lest you risk dying a bit
(or a lot) on the inside....

The default is CFQ which tries to separate IO requests by priority classes,
and then provides fair timeslices to each process within each priority
class. This is meant to be a good balance between low latency and high
overall throughput.

anticipatory used to be default up to like 2.6.9-ish and is designed for
disks where seeking is costly (i.e. mechanical hard drives). The theory is,
this scheduler tries to guess based on past experience after performing a
disk operation in an area of a disk, whether to move on to the next request,
or to sit there for a bit longer (waiting) hoping for more requests for data
in the area. This algorithm is meant to reduce disk seeking, and hence from
the benchmarks I've seen, the anticipatory scheduler is meant to deliver the
highest net throughput but not optimal response times (latency), since it
gives "unfair" preference to data within easy reach so to speak.

The deadline scheduler sets a hard deadline on how much time a particular IO
operation is given before taking it away and giving disk access to another
IO process. It's said that this provides the best response time (latency) to
a flurry of random disk reads amongst other heavy disk activity, such as
opening up a document while a 20GB torrent is hash-checking in the
background. However, it probably delivers the least optimal overall
throughput of the schedulers above.

And finally, noop simply is a null scheduler -- it makes no attempt to
reorder, prioritize, or otherwise optimize IO requests -- I believe its
purpose is for underlying devices which have some sort of IO scheduling
capability, and/or for debugging purposes. I've heard people recommend using
this for solid state media but I haven't seen any reliable sources
confirming or rejecting this claim.


John



On Fri, Nov 7, 2008 at 6:12 AM, (``-_-´´) -- Fernando
<ubuntu at bugabundo.net>wrote:

> Olá Scott e a todos.
>
> On Thursday 06 November 2008 22:44:17 Scott James Remnant wrote:
> > Also you can just fiddle on a per-disk basis, e.g.:
> >   echo -n deadline > /sys/block/sda/queue/scheduler
>
> What other options are there, and in which cases can/should them be used?
>
> Currenctly this is what I hae on mine:
> $ cat /sys/block/sda/queue/scheduler
> noop anticipatory deadline [cfq]
>
>
> --
> BUGabundo  :o)
> (``-_-´´)       http://LinuxNoDEI.BUGabundo.net
> Linux user #443786    GPG key 1024D/A1784EBB
> My new micro-blog @ http://BUGabundo.net
> ps. My emails tend to sound authority and aggressive. I'm sorry in advance.
> I'll try to be more assertive as time goes by...
>
> --
> Ubuntu-devel-discuss mailing list
> Ubuntu-devel-discuss at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-devel-discuss/attachments/20081109/dbba4eed/attachment.html>


More information about the Ubuntu-devel-discuss mailing list