Newsgroups: comp.unix.wizards Path: utzoo!henry From: henry@utzoo.uucp (Henry Spencer) Subject: Re: Write-Behind (was Re: Record-access libraries) Message-ID: <1988Oct27.172705.2662@utzoo.uucp> Organization: U of Toronto Zoology References: <287@cvbnet2.UUCP> <107@minya.UUCP> <74161@sun.uucp> <14122@mimsy.UUCP> <74266@sun.uucp> Date: Thu, 27 Oct 88 17:27:05 GMT In article <74266@sun.uucp> pope@vatican (John Pope) writes: >... I've seen at least one >implementation of disksort() in the operating system that optimized >reads ahead of writes on the theory that processes don't wait for >writes. Such algorithms may also have made their way on board a disk >controller or two... I hope not, since they are known to exhibit pathological behavior under stress. If your system is disk-limited, as many are, it can generate disk i/o requests faster than the controller can service them. Most of those requests are reads. The result is that writes can wait a very long time. Worse, they occupy buffers while waiting, meaning that your buffer pool slowly fills up with pending writes, and the effectiveness of buffer caching drops dramatically. And the amusing part is that this all results from a bug! The read- before-write algorithm was in V7. But it wasn't supposed to be: the code was supposed to put writes before reads! (I asked Dennis.) The "reads are synchronous, writes are not" explanation appears to have been invented after the fact by someone trying to figure out the motive for the (incorrect!) code. -- The dream *IS* alive... | Henry Spencer at U of Toronto Zoology but not at NASA. |uunet!attcan!utzoo!henry henry@zoo.toronto.edu