linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Rik van Riel <riel@conectiva.com.br>,
	Con Kolivas <conman@kolivas.net>,
	linux kernel mailing list <linux-kernel@vger.kernel.org>,
	marcelo@conectiva.com.br
Subject: Re: [BENCHMARK] 2.4.{18,19{-ck9},20rc1{-aa1}} with contest
Date: Sun, 10 Nov 2002 21:10:41 -0800	[thread overview]
Message-ID: <3DCF3BD1.4A95617D@digeo.com> (raw)
In-Reply-To: 20021111043941.GB30193@dualathlon.random

Andrea Arcangeli wrote:
> 
> from your description it seems what will happen is:
> 
>         queue 3 5 6 7 8 9
> 
> I don't see why you say it won't do that. the whole point of the patch
> to put reads at or near the head, and you say 3 won't be put at the
> head if only 5 writes are pending. Or maybe your bypasses "6 writes"
> means the other way around, that you put the read as the seventh entry
> in the queue if there are 6 writes pending, is it the case?

Actually I thought your "queue" was "head of queue" and that 5,6,7,8 and 9
were reads....

If the queue contains, say:

(head)	R1 R2 R3 W1 W2 W3 W4 W5 W6 W7

Then a new R4 will be inserted between W6 and W7.  So if R5 is mergeable
with R4 there is still plenty of time for that.


> > > > > However I think even read-latency is more a workarond to a
> > > > > problem in
> > > > > the I/O queue dimensions.
> > > >
> > > > The problem is the 2.4 algorithm.  If a read is not mergeable or
> > > > insertable it is placed at the tail of the queue.  Which is the
> > > > worst possible place it can be put because applications wait on
> > > > reads, not on writes.
> > >
> > > O_SYNC/-osync waits on writes too, so are you saying writes must go to
> > > the head because of that?
> >
> > It has been discussed: boost a request to head-of-queue when a thread
> > starts to wait on a buffer/page which is inside that request.
> >
> > But we don't care about synchronous writes.  As long as we don't
> > starve them out completely, optimise the (vastly more) common case.
> 
> yes, it should be worthwhile to potentially decrease a little the global
> throughput to increase significantly the read latency, I'm not against
> that, but before I would care about that I prefer to get a limit on the
> size of the queue in bytes, not in requests,

Really, it should be in terms of "time".  If you assume 6 msec seek and
30 mbyte/sec bandwidth, the crossover is a 120 kbyte I/O.  Not that I'm
sure this means anything interesting ;)  But the lesson is that the
size of a request isn't very important.

> actually it's probably much worse tha a 10 times ratio since the writer
> is going to use big requests, while the reader is probably seeking with
> <=4k requests.
> 

Yup.  This is one case where improving latency improves throughput,
if there's computational work to be done.

2.5 (and read-latency) sort-of solve these problems by creating a
massive seekstorm when there are competing reads and writes.  It's
a pretty sad solution really.

Better would be to perform those reads and writes in nice big batches.
That's easy for the writes, but for reads we need to wait for the
application to submit another one.  That means actually deliberately
leaving the disk head idle for a few milliseconds in the anticipation
that the application will submit another nearby read.  This is called
"anticipatory scheduling" and has been shown to provide 20%-70%
performance boost in web serving workloads.   It just makes heaps of
sense to me and I'd love to see it in Linux...

See http://www.cs.ucsd.edu/sosp01/papers/iyer.pdf

  reply	other threads:[~2002-11-11  5:04 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09  2:00 [BENCHMARK] 2.4.{18,19{-ck9},20rc1{-aa1}} with contest Con Kolivas
2002-11-09  2:36 ` Andrew Morton
2002-11-09  3:26   ` Con Kolivas
2002-11-09  4:15     ` Andrew Morton
2002-11-09  5:12       ` Con Kolivas
2002-11-09 11:21         ` Jens Axboe
2002-11-09 13:09           ` Con Kolivas
2002-11-09 13:35             ` Stephen Lord
2002-11-09 13:54             ` Jens Axboe
2002-11-09 21:12               ` Arador
2002-11-10  2:26                 ` Andrea Arcangeli
2002-11-09 21:53               ` Con Kolivas
2002-11-10 10:09                 ` Jens Axboe
2002-11-10 16:23                   ` Andrea Arcangeli
2002-11-11  4:26                   ` Con Kolivas
2002-11-10 10:12               ` Kjartan Maraas
2002-11-10 10:17                 ` Jens Axboe
2002-11-10 16:27                 ` Andrea Arcangeli
2002-11-09 11:20       ` Jens Axboe
2002-11-10  2:44 ` Andrea Arcangeli
2002-11-10  3:56   ` Matt Reppert
2002-11-10  9:58   ` Con Kolivas
2002-11-10 10:06     ` Jens Axboe
2002-11-10 16:21       ` Andrea Arcangeli
2002-11-10 16:20     ` Andrea Arcangeli
2002-11-10 19:32   ` Rik van Riel
2002-11-10 20:10     ` Andrea Arcangeli
2002-11-10 20:52       ` Andrew Morton
2002-11-10 21:05         ` Rik van Riel
2002-11-11  1:54           ` Andrea Arcangeli
2002-11-11  4:03             ` Andrew Morton
2002-11-11  4:06               ` Andrea Arcangeli
2002-11-11  4:22                 ` Andrew Morton
2002-11-11  4:39                   ` Andrea Arcangeli
2002-11-11  5:10                     ` Andrew Morton [this message]
2002-11-11  5:23                       ` Andrea Arcangeli
2002-11-11  7:58                       ` William Lee Irwin III
2002-11-11 13:56                       ` Rik van Riel
2002-11-11 13:45             ` Rik van Riel
2002-11-11 14:09               ` Jens Axboe
2002-11-11 15:48                 ` Andrea Arcangeli
2002-11-11 15:43               ` Andrea Arcangeli
2002-11-10 20:56       ` Andrew Morton
2002-11-11  1:08         ` Andrea Arcangeli
2002-11-09  3:44 Dieter Nützel
2002-11-09  3:54 ` Con Kolivas
2002-11-09  4:02   ` Dieter Nützel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3DCF3BD1.4A95617D@digeo.com \
    --to=akpm@digeo.com \
    --cc=andrea@suse.de \
    --cc=conman@kolivas.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    --cc=riel@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).