2003-05-08 10:03:19

by Szonyi Calin

[permalink] [raw]
Subject: Q: Anticipatory scheduler docs

Hello everyone

Where can I find documentation about the anticipatory scheduler
and about tuning it ?

Thanks

Bye
Calin

--
# fortune
fortune: write error on /dev/null --- please empty the bit bucket


-----------------------------------------
This email was sent using SquirrelMail.
"Webmail for nuts!"
http://squirrelmail.org/



2003-05-08 13:41:30

by Nick Piggin

[permalink] [raw]
Subject: Re: Q: Anticipatory scheduler docs

Szonyi Calin wrote:

>Hello everyone
>
>Where can I find documentation about the anticipatory scheduler
>and about tuning it ?
>
Ahh heh... when I write them :P
Seriously, its been under quite a bit of work, I've tried to
keep some docs up to date but its not worth it at the moment.
Its getting more stable now, but I have some auto tuning
stuff on the cards which changes things again...

Anyway in brief there are 5 parameters under /sys/block/*/iosched/
all are set in milliseconds.
* read_expire
Controls how long until a request becomes "expired". It also controls
the interval between which expired requests are served, so set to 50,
a request might take anywhere < 100ms to be serviced _if_ it is the
next on the expired list. Obviously it can't make the disk go faster.
Result is basically the timeslice a reader gets in the presence of
other IO. 100*((seek time / read_expire) + 1) is very roughly the
% streaming read efficiency your disk should get in the presence of
multiple readers.
* read_batch_expire
Controls how much time a batch of reads is given before pending writes
are served. Higher value is more efficient. Shouldn't really be below
read_expire.
* write_ versions of the above
* antic_expire
Controls the maximum amount of time we can anticipate a good read
before giving up. Many other factors may cause anticipation to be
stopped early, or some processes will not be "anticipated" at all.
Should be a bit higher for big seek time devices though not a
linear correspondance - most processes have only a few ms thinktime.

Hows that? Let me know of any benchmark results you might happen upon.