public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Zhang, Yanmin" <yanmin_zhang@linux.intel.com>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: Nick Piggin <npiggin@suse.de>, Ying Han <yinghan@google.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: fio sync read 4k block size 35% regression
Date: Thu, 02 Jul 2009 11:34:20 +0800	[thread overview]
Message-ID: <1246505660.2560.482.camel@ymzhang> (raw)
In-Reply-To: <20090701125027.GA28347@localhost>

[-- Attachment #1: Type: text/plain, Size: 2887 bytes --]

On Wed, 2009-07-01 at 20:50 +0800, Wu Fengguang wrote:
> On Wed, Jul 01, 2009 at 01:03:55PM +0800, Zhang, Yanmin wrote:
> > On Wed, 2009-07-01 at 12:10 +0800, Wu Fengguang wrote:
> > > On Wed, Jul 01, 2009 at 11:25:33AM +0800, Zhang, Yanmin wrote:
> > > > Comapraing with 2.6.30, fio sync read (block size 4k) has about 35% regression
> > > > with kernel 2.6.31-rc1 on my stoakley machine with a JBOD (13 SCSI disks).
> > > > 
> > > > Every disk has 1 partition and 4 1-GB files. Start 10 processes per disk to
> > > > do sync read sequentinally.
> > > > 
> > > > Bisected down to below patch.
> > > > 
> > > > 51daa88ebd8e0d437289f589af29d4b39379ea76 is first bad commit
> > > > commit 51daa88ebd8e0d437289f589af29d4b39379ea76
> > > > Author: Wu Fengguang <fengguang.wu@intel.com>
> > > > Date:   Tue Jun 16 15:31:24 2009 -0700
> > > > 
> > > >     readahead: remove sync/async readahead call dependency
> > > > 
> > > >     The readahead call scheme is error-prone in that it expects the call sites
> > > >     to check for async readahead after doing a sync one.  I.e.
> > > > 
> > > >                         if (!page)
> > > >                                 page_cache_sync_readahead();
> > > >                         page = find_get_page();
> > > >                         if (page && PageReadahead(page))
> > > >                                 page_cache_async_readahead();
> > > > 
> > > > 
> > > > I also test block size 64k and 128k, but they don't have regression. Perhaps
> > > > the default read_ahead_kb is equal to 128?
> > > > 
> > > > Other 2 machines have no such regression. The JBODS of the 2 machines consists
> > > > of 12 and 7 SATA/SAS disks while every disk has 2 partitions.
> > > 
> > > Yanmin, thanks for the tests!
> > > 
> > > Maybe the patch posted here can restore the performance:
> > > 
> > > http://lkml.org/lkml/2009/5/21/319
> > I tried it and it doesn't help.
> 
> Then let's check what's happening behind the scene :)
> 
> Please apply the attached patch and run
> 
>         echo 1 > /debug/readahead/trace_enable
>         # do benchmark
>         echo 0 > /debug/readahead/trace_enable
> 
> and send the dmesg which will contain lots of lines like
> 
>         [   54.738105] readahead-initial0(pid=3290(zsh), dev=00:10(0:10), ino=105910(dmesg), req=0+1, ra=0+4-3, async=0) = 2
>         [   54.751801] readahead-subsequent(pid=3290(dmesg), dev=00:10(0:10), ino=105910(dmesg), req=1+60, ra=4+8-8, async=1, miss=0) = 0
I enlarged sys log buffer to 2MB and captured below data.

In addition, I added new test cases to use mmap to read the files sequentionally.
On this machine, there is about 40% regression. reverting your patch fixes it.

On another machine with another JBOD (7 SAS disks), fio_mmap_sync_read_4k (64k/128k)
has about 30% regression. But it's not caused by your patch. I am bisecting it on the
2nd machine now.

Yanmin


[-- Attachment #2: fg_trace_sync_read_4k.txt.tgz --]
[-- Type: application/x-compressed-tar, Size: 117999 bytes --]

  reply	other threads:[~2009-07-02  3:34 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-01  3:25 fio sync read 4k block size 35% regression Zhang, Yanmin
2009-07-01  4:12 ` Wu Fengguang
     [not found] ` <20090701041010.GB22364@localhost>
2009-07-01  5:03   ` Zhang, Yanmin
2009-07-01 12:50     ` Wu Fengguang
2009-07-02  3:34       ` Zhang, Yanmin [this message]
2009-07-02 12:37         ` Wu Fengguang
2009-07-03  5:01           ` Zhang, Yanmin

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=1246505660.2560.482.camel@ymzhang \
    --to=yanmin_zhang@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --cc=yinghan@google.com \
    /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