From: Dave Chinner <david@fromorbit.com>
To: "Al Lau (alau2)" <alau2@cisco.com>
Cc: "xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: mkfs.xfs -n size=65536
Date: Tue, 13 Oct 2015 19:25:48 +1100 [thread overview]
Message-ID: <20151013082548.GH31326@dastard> (raw)
In-Reply-To: <b391cb17b6714a479150f9681380e102@XCH-ALN-020.cisco.com>
On Tue, Oct 13, 2015 at 07:28:48AM +0000, Al Lau (alau2) wrote:
> Are the xfs_db and filefrag the utilities to use to determine file fragmentation?
>
> # df -k /var/kmem_alloc
> Filesystem 1K-blocks Used Available Use% Mounted on
> /dev/sdf1 3905109820 3359385616 545724204 87% /var/kmem_alloc
> # xfs_db -r -c frag /dev/sdf1
> actual 438970, ideal 388168, fragmentation factor 11.57%
http://xfs.org/index.php/XFS_FAQ#Q:_The_xfs_db_.22frag.22_command_says_I.27m_over_50.25._Is_that_bad.3F
> # ls -l fragmented
> -rw-r--r--. 1 root root 3360239878657 Oct 13 07:25 fragmented
> # filefrag fragmented
> fragmented: 385533 extents found
That's a lot of extents, but for a 3TB sparse file that is being
written in random 4k blocks, that's expected and there's little you
can do about it. Preallocation of the file or use of extent size
hints will reduce physical fragmentation, but you only want to use
those if the file will eventually become non-sparse and sequential
read IO performance is required...
i.e. the definition of "fragmented" really depends on the
application, IO patterns and whether the current physical layout is
acheiving the desired performance attributes of the file in
question....
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:[~2015-10-13 8:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-09 22:40 mkfs.xfs -n size=65536 Al Lau (alau2)
2015-10-13 0:23 ` Dave Chinner
2015-10-13 1:39 ` Al Lau (alau2)
2015-10-13 3:33 ` Dave Chinner
2015-10-13 3:42 ` Al Lau (alau2)
2015-10-13 3:55 ` Al Lau (alau2)
2015-10-13 4:30 ` Dave Chinner
2015-10-13 7:28 ` Al Lau (alau2)
2015-10-13 8:25 ` Dave Chinner [this message]
2015-11-06 2:06 ` Al Lau (alau2)
2015-10-13 4:04 ` Al Lau (alau2)
2015-10-13 22:05 ` Al Lau (alau2)
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=20151013082548.GH31326@dastard \
--to=david@fromorbit.com \
--cc=alau2@cisco.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