public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Giuliano Pochini <pochini@shiny.it>
Cc: linux-kernel@vger.kernel.org, "chen, xiangping" <chen_xiangping@emc.com>
Subject: Re: Poor read performance when sequential write presents
Date: Fri, 24 May 2002 02:26:48 -0700	[thread overview]
Message-ID: <3CEE0758.27110CAD@zip.com.au> (raw)
In-Reply-To: <3CED4843.2783B568@zip.com.au> <XFMail.20020524105942.pochini@shiny.it>

Giuliano Pochini wrote:
> 
> >> I did a IO test with one sequential read and one sequential write
> >> to different files. I expected somewhat similar throughput on read
> >> and write. But it seemed that the read is blocked until the write
> >> finishes. After the write process finished, the read process slowly
> >> picks up the speed. Is Linux buffer cache in favor of write? How
> >> to tune it?
> > [...]
> > 2: Apply http://www.zip.com.au/~akpm/linux/patches/2.4/2.4.19-pre5/read-latency2.patch
> 
> Hmmm, someone wrote a patch to fix another related problem: the fact
> that multiple readers read at a very different speed. It's not unusual
> that one reader gets stuck until all other have finished. I don't
> remember who wrote that patch, sorry.

Oh absolutely.   That's the reason why 2.4 is beating 2.5 at tiobench with
more than one thread.  2.5 is alternating fairly between threads and 2.4
is not.  So 2.4 seeks less.

I've been testing this extensively on 2.5 + multipage BIO I/O and when you
increase readahead from 32 pages (two BIOs) to 64 pages (4 BIOs), 2.5 goes
from perfect to horrid - each threads grabs the disk head and performs many,
many megabytes of read before any other thread gets a share.  Net effect is
that the tiobench numbers are great, but any operation which involves
reading disk has 30 or 60 second latencies.

Interestingly, it seems specific to IDE.  SCSI behaves well.

I have tons of traces and debug code - I'll bug Jens about this in a week or
so.

-

  reply	other threads:[~2002-05-24  9:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-23 14:20 Poor read performance when sequential write presents chen, xiangping
2002-05-23 19:51 ` Andrew Morton
2002-05-24  8:59   ` Giuliano Pochini
2002-05-24  9:26     ` Andrew Morton [this message]
2002-05-24  9:46       ` William Lee Irwin III
2002-05-24 10:04         ` Andrew Morton
2002-05-27  8:06           ` Jens Axboe
2002-05-27  8:22             ` Andrew Morton
2002-05-27  8:54               ` Jens Axboe
2002-05-27  9:35                 ` Andrew Morton
2002-05-28  9:25                   ` Jens Axboe
2002-05-28  9:36                     ` Jens Axboe

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=3CEE0758.27110CAD@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=chen_xiangping@emc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pochini@shiny.it \
    /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