Subject: Re: Limiting disk I/O?
To: Jukka Marin <jmarin@embedtronics.fi>
From: Manuel Bouyer <bouyer@antioche.eu.org>
List: tech-kern
Date: 11/13/2007 12:22:42
On Tue, Nov 13, 2007 at 09:36:22AM +0200, Jukka Marin wrote:
> On Tue, Nov 13, 2007 at 07:15:15AM +0000, Michael van Elst wrote:
> > >Wouldn't it be simpler to implement a new sysctl'able variable to limit the
> > >tps to some percentage of the disk I/O capacity?
> > 
> > The problem is not the disk. If you slow down the disk artificially
> > you just make the problem larger as you run out of buffers earlier.
> 
> The disk is part of the problem, at least with twa.  It seems the performance
> collapses when the controller becomes real busy.  Even tw_cli (the 3ware cli
> tool) starts to crawl when softdep is pushing data to disk.

I suspect it's because of on-board cache issues. As long as there is room
in the cache the write is fast, and the controller does the read/modify/write
to the disk in background (or, if you're lucky, it ends up with a full stripe
and only has to do a write). But once the cache is full, you an I/O needs to
wait for some pending writes to complete.
I'm not sure slowing down I/O will help with this, because, one way or the
other, you need time to get the data on disk.

I think these controllers have tunable parameters, especially random ws
sequential optimisations. This may make a difference ...

-- 
Manuel Bouyer, LIP6, Universite Paris VI.           Manuel.Bouyer@lip6.fr
     NetBSD: 26 ans d'experience feront toujours la difference
--