From: Dave Chinner <david@fromorbit.com>
To: Michael Monnerie <michael.monnerie@is.it-management.at>
Cc: xfs@oss.sgi.com
Subject: Re: XFS journaling position
Date: Wed, 27 Oct 2010 10:28:16 +1100 [thread overview]
Message-ID: <20101026232816.GB32255@dastard> (raw)
In-Reply-To: <201010270027.26687@zmi.at>
On Wed, Oct 27, 2010 at 12:27:26AM +0200, Michael Monnerie wrote:
> On Montag, 25. Oktober 2010 Geoffrey Wehrman wrote:
> > I haven't found any documentation to support this, but I have been
> > told that the middle was selected for the single disk case to
> > minimize seek times. The distance the head must travel to or from
> > other locations on the disk is optimized by placing the log in the
> > middle of the disk.
>
> This is based on the assumption that
> 1) a disk is totally filled with data and
> 2) the partition that XFS resides on is the only one on the disk.
>
> For PCs or small servers you normally have a swap partition, the
> recommended size is RAMx2 (at least it was once suggested, I've always
> only set it to RAM size). Then you have at least a root filesystem,
> which often won't be XFS, and then the data partition, which could be a
> single partition until the end of the disk. For a single 300GB disk,
> this means that around 20-50GB will be used by "other" (swap, root,
> windows?) partitions, then maybe a single 250-280GB partition for XFS.
Doesn't matter - the placement of the log matters when the XFS
partition is busy, not when you are swapping or your root filesystem
is doing stuff. If you have traffic to multiple partitions at once,
then nothing you do to the filesystem layout will make much
difference.
> If you place the journal in the middle of the partition, you are already
> in an area where disks are slower than on the outside. And if you fill
> only half of the partition, it means your log is totally on the end of
> the disk, access-wise.
Well, no. XFS does not fill the filesystem from the start to the
end. XFS spreads the data and metadata across all the allocation
groups, and so there is generally as much metađata/data on either
side of the log at any given time. For example, a kernel tree on a
120GB filesystem with 4 AGs has the following distribution of
extents:
AG extents
0 10750
1 10730
2 9994
3 10265
So you can see that with the log at the start of AG 2, there is a
pretty even chance of any specific IO in that kernel tree being
either side of the log....
The difference in sequential performance from AG 0 to AG 3 on this
drive is about 10MB/s, but the worst case seek time is around 18ms
and average is about 9ms. IOWs, the benefit of seek time reduction
by placing the log in the middle is for more than the improvement
in sequential throughput would give by placing the log in AG 0.
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-10-26 23:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 5:26 XFS journaling position klonatos
2010-10-25 16:10 ` Geoffrey Wehrman
2010-10-26 22:27 ` Michael Monnerie
2010-10-26 23:28 ` Dave Chinner [this message]
2010-10-26 23:59 ` Michael Monnerie
2010-10-27 14:27 ` Robert Brockway
2010-10-27 14:32 ` Robert Brockway
2010-10-28 9:44 ` Michael Monnerie
2010-10-28 23:33 ` Stan Hoeppner
2010-10-29 7:58 ` Michael Monnerie
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=20101026232816.GB32255@dastard \
--to=david@fromorbit.com \
--cc=michael.monnerie@is.it-management.at \
--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