Subject: Re: Limiting disk I/O?
To: Jukka Marin <>
From: Andrew Doran <>
List: tech-kern
Date: 12/02/2007 16:26:03
On Tue, Nov 13, 2007 at 12:32:49AM +0200, Jukka Marin wrote:
> On Mon, Nov 12, 2007 at 09:07:34PM +0000, Andrew Doran wrote:
> > This patch is against current but it should apply to netbsd-4, and I think
> > it may help. If it doesn't apply it's easy to make the changes by hand:
> > 
> >
> Indeed, this helps to keep the disks accessible during high disk I/O - but
> it also affects the performance provided by softdep.  Time to extract
> pkgsrc.tar.gz:
> - with softdep and the patch:
>   2.073u 11.905s 3:02.38 7.6%     0+0k 895+24016io 0pf+0w
> - without softdep:
>   2.249u 10.499s 3:32.37 5.9%     0+0k 895+536917io 0pf+0w
> With softdep, but without the patch, pkgsrc extract takes less than 14
> seconds in case syncer does not kick in during the operation.

It should not be that slow but softdep has done its job here (24016io vs
536917io). Untarring pkgsrc in 14 seconds is a bit of an illusion, because
all the updates have just been dumped into memory and are not on the disk.
As it stands with the softdep code there can be maybe 1/2 million of those
sitting around which naturally causes problems when it comes time to flush
them to disk. Really what it needs is a better way to pace threads that are
making too many updates in quick succession. At the moment it is all global.