Re: I/O request ordering

Stephen C. Tweedie (sct@dcs.ed.ac.uk)
Tue, 6 Aug 1996 23:57:29 +0100


Hi,

On Tue, 6 Aug 1996 11:55:46 +0300 (EET DST), Linus Torvalds
<torvalds@cs.helsinki.fi> said:

> On Mon, 5 Aug 1996, Ray Van Tassle-CRV004 wrote:

>> For some time, I have had doubts about the I/O request ordering algorithm in
>> drivers/block/ll_blk_rw. ...

> If you _really_ want to improve performance, you should probably not use an
> elevator. Instead, you should use something like "saw-tooth with a window",
> where the "window" part is that the ordering algorithm will actually accept a
> "backwards" request if it is within an acceptance window (of say 5% of the
> disk or something like that). That can help a lot due to drive caching
> (generally track caches).

5% seems an *awful* lot. There is a major problem with this sort of
window, which is that fairness is sacrificed. It's not uncommon to
have a lot of IO occurring at one part of the disk. The sawtooth
guarantees that the request pointer will eventually move on to other
requests. For example, take the case where there's a lot of syslog
activity; you'll have a file being constantly written to disk via
fsync, which can generate a lot of local write activity. You may
starve the rest of the system if you don't limit the amount of
backtracking allowed.

Cheers,
Stephen.

--
Stephen Tweedie <sct@dcs.ed.ac.uk>
Department of Computer Science, Edinburgh University, Scotland.