public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Brian Candler <B.Candler@pobox.com>
Cc: Christoph Hellwig <hch@infradead.org>, xfs@oss.sgi.com
Subject: Re: Performance problem - reads slower than writes
Date: Mon, 6 Feb 2012 09:50:04 +1100	[thread overview]
Message-ID: <20120205225004.GG6922@dastard> (raw)
In-Reply-To: <20120203211741.GA2592@nsrc.org>

On Fri, Feb 03, 2012 at 09:17:41PM +0000, Brian Candler wrote:
> On Fri, Feb 03, 2012 at 09:01:14PM +0000, Brian Candler wrote:
> > I created a fresh filesystem (/dev/sdh), default parameters, but mounted it
> > with inode64.  Then I tar'd across my corpus of 100K files.  Result: files
> > are located close to the directories they belong to, and read performance
> > zooms.
> 
> Although perversely, keeping all the inodes at one end of the disk does
> increase throughput with random reads, and also under high concurrency loads
> (for this corpus of ~65GB anyway, maybe not true for a full disk)
> 
> -- original results: defaults without inode64 --
> 
>  #p  files/sec  dd_args
>   1      43.57  bs=1024k
>   1      43.29  bs=1024k [random]
>   2      51.27  bs=1024k 
>   2      48.17  bs=1024k [random]
>   5      69.06  bs=1024k 
>   5      63.41  bs=1024k [random]
>  10      83.77  bs=1024k 
>  10      77.28  bs=1024k [random]
> 
> -- defaults with inode64 --
> 
>  #p  files/sec  dd_args
>   1     138.20  bs=1024k 
>   1      30.32  bs=1024k [random]
>   2      70.48  bs=1024k 
>   2      27.25  bs=1024k [random]
>   5      61.21  bs=1024k 
>   5      35.42  bs=1024k [random]
>  10      80.39  bs=1024k 
>  10      45.17  bs=1024k [random]
> 
> Additionally, I see a noticeable boost in random read performance when using
> -i size=1024 in conjunction with inode64, which I'd also like to understand:
> 
> -- inode64 *and* -i size=1024 --
> 
>  #p  files/sec  dd_args
>   1     141.52  bs=1024k 
>   1      38.95  bs=1024k [random]
>   2      67.28  bs=1024k 
>   2      42.15  bs=1024k [random]
>   5      79.83  bs=1024k 
>   5      57.76  bs=1024k [random]
>  10      86.85  bs=1024k
>  10      72.45  bs=1024k [random]

Directories probably take less IO to read because they remain in
short/extent form rather than moving to leaf/node (btree)
format because you can fit more extent records in line in the inode.
That means probably 1 IO less per random read. However, it has other
downsides, like requiring 4x as much IO to read and write the same
number of inodes when under memory pressure (e.g. when you app is
using 98% of RAM).

Basically, you are discovering how to tune your system for optimal
performance with a given set of bonnie++ parameters. Keep in mind
that's exactly what we suggest you -don't- do when tuning a
filesystem:

http://xfs.org/index.php/XFS_FAQ#Q:_I_want_to_tune_my_XFS_filesystems_for_.3Csomething.3E

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2012-02-05 22:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-30 22:00 Performance problem - reads slower than writes Brian Candler
2012-01-31  2:05 ` Dave Chinner
2012-01-31 10:31   ` Brian Candler
2012-01-31 14:16     ` Brian Candler
2012-01-31 20:25       ` Dave Chinner
2012-02-01  7:29         ` Stan Hoeppner
2012-02-03 18:47         ` Brian Candler
2012-02-03 19:03           ` Christoph Hellwig
2012-02-03 21:01             ` Brian Candler
2012-02-03 21:17               ` Brian Candler
2012-02-05 22:50                 ` Dave Chinner [this message]
2012-02-05 22:43               ` Dave Chinner
2012-01-31 14:52     ` Christoph Hellwig
2012-01-31 21:52       ` Brian Candler
2012-02-01  0:50         ` Raghavendra D Prabhu
2012-02-01  3:59         ` Dave Chinner
2012-02-03 11:54       ` Brian Candler
2012-02-03 19:42         ` Stan Hoeppner
2012-02-03 22:10           ` Brian Candler
2012-02-04  9:59             ` Stan Hoeppner
2012-02-04 11:24               ` Brian Candler
2012-02-04 12:49                 ` Stan Hoeppner
2012-02-04 20:04                   ` Brian Candler
2012-02-04 20:44                     ` Joe Landman
2012-02-06 10:40                       ` Brian Candler
2012-02-07 17:30                       ` Brian Candler
2012-02-05  5:16                     ` Stan Hoeppner
2012-02-05  9:05                       ` Brian Candler
2012-01-31 20:06     ` Dave Chinner
2012-01-31 21:35       ` Brian Candler

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=20120205225004.GG6922@dastard \
    --to=david@fromorbit.com \
    --cc=B.Candler@pobox.com \
    --cc=hch@infradead.org \
    --cc=xfs@oss.sgi.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