Re: Slow file transfer speeds with CFQ IO scheduler in some cases

From: Jeff Layton
Date: Tue Nov 11 2008 - 16:59:57 EST


On Tue, 11 Nov 2008 16:41:04 -0500
Jeff Layton <jlayton@xxxxxxxxxx> wrote:

> On Tue, 11 Nov 2008 14:36:07 -0500
> Jeff Moyer <jmoyer@xxxxxxxxxx> wrote:
>
> > Jens Axboe <jens.axboe@xxxxxxxxxx> writes:
> >
> > > OK, that looks better. Can I talk you into just trying this little
> > > patch, just to see what kind of performance that yields? Remove the cfq
> > > patch first. I would have patched nfsd only, but this is just a quick'n
> > > dirty.
> >
> > I went ahead and gave it a shot. The updated CFQ patch with no I/O
> > context sharing does about 40MB/s reading a 1GB file. Backing that
> > patch out, and then adding the patch to share io_context's between
> > kthreads yields 45MB/s.
> >
>
> Here's a quick and dirty patch to make all of the nfsd's have the same
> io_context. Comments appreciated -- I'm not that familiar with the IO
> scheduling code. If this looks good, I'll clean it up, add some
> comments and formally send it to Bruce.
>

No sooner than I send it out than I find a bug. We need to eventually
put the io_context reference we get. This should be more correct:

----------------[snip]-------------------