All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: "chen, xiangping" <chen_xiangping@emc.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Poor read performance when sequential write presents
Date: Thu, 23 May 2002 12:51:31 -0700	[thread overview]
Message-ID: <3CED4843.2783B568@zip.com.au> (raw)
In-Reply-To: <FA2F59D0E55B4B4892EA076FF8704F553D1A7A@srgraham.eng.emc.com>

"chen, xiangping" wrote:
> 
> Hi,
> 
> 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?
> 

Reads and writes are very different beasts - writes deal with
the past and have good knowledge of what to do.  But reads
must predict the future.

You need to do two things:

1: Configure the device for a really big readahead window.

   Configuring readahead in 2.4 is a pig.  Try one of the
   following:

     echo file_readahead:N > /proc/ide/hda/settings   (N is kilobytes)
     blockdev --setra M /dev/hda                      (M is in 512 byte sectors)
     echo K > /prov/sys/vm/max-readahead              (K is in pages - 4k on x86)

   You'll find that one of these makes a difference.

2: Apply http://www.zip.com.au/~akpm/linux/patches/2.4/2.4.19-pre5/read-latency2.patch
   which will prevent reads from being penalised by writes.
   Or use a -ac kernel, which already has this patch.

-

  reply	other threads:[~2002-05-23 19:52 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 [this message]
2002-05-24  8:59   ` Giuliano Pochini
2002-05-24  9:26     ` Andrew Morton
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=3CED4843.2783B568@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=chen_xiangping@emc.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.