From: Dave Chinner <david@fromorbit.com>
To: Stan Hoeppner <stan@hardwarefreak.com>
Cc: xfs@oss.sgi.com
Subject: Re: XFS buffered sequential read performance low after kernel upgrade
Date: Sat, 13 Mar 2010 21:48:50 +1100 [thread overview]
Message-ID: <20100313104850.GG4732@dastard> (raw)
In-Reply-To: <4B9B62DE.4090301@hardwarefreak.com>
On Sat, Mar 13, 2010 at 04:03:10AM -0600, Stan Hoeppner wrote:
> Dave Chinner put forth on 3/12/2010 6:16 PM:
>
> Thanks for the tips Dave.
>
> > Those tests don't go through the filesystem - they go directly to the
> > block device. Hence if these are different to your old kernel, the
> > problem is outside XFS. I'd suggest the most likely cause is the
> > elevator - if you are using CFQ try turning off the new low-latency
> > mode, or changing to deadline or noop and see if the problem goes
> > away.
>
> I'm using the deadline elevator as the kernel default on both the old and
> new kernels. I have been for quite some time as it seems to yield over
> double the random I/O seek performance of the cfq elevator for threaded or
> multi-tasking workloads. My SATA controller doesn't support NCQ. In my
> testing the deadline elevator seems to "restore" the lost performance that
> NCQ would have provided, at the cost of a little more kernel/CPU overhead.
>
> > Also, the XFS partitions are on the inner edge of the disk, so they
> > are always going to be slower (can be as low as half the speed) than
> > partitions on the outer edge of the disk for sequential access...
>
> It's a 500GB single platter drive. I've partitioned a little less than
> 250GB of it, starting at the outer edge (at least that's what I instructed
> cfdisk to do). Relatively speaking, the two 100GB XFS partitions should be
> closer to the outer than inner tracks. The EXT2 / partition is obviously
> right on the outer edge. The start of the first XFS partition is at the
> ~35GB mark out of 500GB, so it's right there too, and should have very
> similar direct block read performance. Yes?
Yeah, they should be the roughly the same given that layout. I'd
check/increase the readahead of the block device to see if that makes
any difference (/sys/block/sd?/bdi/read_ahead_kb).
> What boggles me is why my dd write speeds are 15-20MB/s faster than the read
> speeds on the XFS partitions, considering, as you state, that the reads are
> direct block I/O reads, bypassing the FS. Since I'm writing to a file in
> the write tests, doesn't the writing have to go through XFS? If so, why is
> it so much faster than the reads? Linux kernel and XFS write buffers? The
> 16MB cache chip on the drive?
>
> ~$ dd if=/dev/sda6 of=/dev/null bs=4096 count=100000
> 100000+0 records in
> 100000+0 records out
> 409600000 bytes (410 MB) copied, 9.07389 s, 45.1 MB/s
>
> ~$ dd if=/dev/zero of=/home/stan/test.xfs bs=4096 count=100000
> 100000+0 records in
> 100000+0 records out
> 409600000 bytes (410 MB) copied, 6.16098 s, 66.5 MB/s
That doesn't time how long it takes for all the data to get to the
disk, just for it all to get into the cache. Run it like this:
$ time (dd if=/dev/zero of=/home/stan/test.xfs bs=4096 count=100000; sync)
And work out the speed from the time reported, not what dd tells
you.
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-03-13 10:47 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-12 11:48 XFS buffered sequential read performance low after kernel upgrade Stan Hoeppner
2010-03-12 12:46 ` Stan Hoeppner
2010-03-13 0:16 ` Dave Chinner
2010-03-13 10:03 ` Stan Hoeppner
2010-03-13 10:48 ` Dave Chinner [this message]
2010-03-13 15:24 ` Robert Brockway
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=20100313104850.GG4732@dastard \
--to=david@fromorbit.com \
--cc=stan@hardwarefreak.com \
--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