Subject: Re: Limiting disk I/O?
To: Joerg Sonnenberger <email@example.com>
From: Thor Lancelot Simon <firstname.lastname@example.org>
Date: 11/12/2007 10:21:02
On Mon, Nov 12, 2007 at 01:16:39PM +0100, Joerg Sonnenberger wrote:
> On Mon, Nov 12, 2007 at 09:24:34AM +0200, Jukka Marin wrote:
> > Is there a way to limit the number of transfers to disk per second? Or
> > better yet, a way to limit the disk load ("%busy" in systat) to, say, 90%?
> > Ideally, this should probably affect only ioflush, so other disk accesses
> > would still be possible. Or maybe there's an even better way of preventing
> > the cache flush from overloading the disk(s)?
> Have you tried using a different IO scheduler? There are kernel options
> to give priority sorting and read-optimised scheduling. You can select
> the policy for a device with dkctl $dev strategy. The default is first
> come, first serve. It can also help to disable softdep :-)
The default shouldn't be first-come, first-serve, except for a few RAID
controllers and other devices known to sort better internally than we do
in the kernel. I don't know if twa is one of these. But BUFQ_PRIOCSCAN
may perform better even with RAID controllers.
The first thing I'd try in this situation actually would be to bump up
maxvnodes so things that want entries in the namei cache don't sleep
waiting for vnodes to be recycled, and then I'd adjust the syncer delays
to be shorter so less data could queue up and the controller could put it
out to the disks faster.