From: Dave Chinner <david@fromorbit.com>
To: Florian Weimer <fw@deneb.enyo.de>
Cc: Brian Foster <bfoster@redhat.com>, xfs@oss.sgi.com
Subject: Re: [FAQ] XFS speculative preallocation
Date: Sat, 22 Mar 2014 10:10:33 +1100 [thread overview]
Message-ID: <20140321231032.GC1389@dastard> (raw)
In-Reply-To: <87eh1vuxam.fsf@mid.deneb.enyo.de>
On Fri, Mar 21, 2014 at 09:11:29PM +0100, Florian Weimer wrote:
> * Brian Foster:
>
> > Although speculative preallocation can lead to reports of excess space
> > usage, the preallocated space is not permanent unless explicitly made so
> > via fallocate or a similar interface.
>
> How does an explicit allocation with posix_fallocate interact with
> speculative preallocation? Does it disable it?
fallocate is permanent preallocation using unwritten extents.
Speculative preallocation is an extension of delayed allocation that
is done when extending the file and the EOF falls into a hole. If
there is unwritten extents beyond EOF, speulative preallocation is
not performed.
> I see rather dramatic fragmentation of the systemd journal when it is
> stored on XFS, and it calls posix_fallocate before writing data to the
> file.
There's your problem - systemd is preventing delayed allocation, and
so it fragmenting the file itself with it's write pattern.
Basically, that's a bug in systemd, and not something the filesystem
can avoid because userspace is directly controlling block
allocation.
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:[~2014-03-21 23:10 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-21 16:29 [FAQ] XFS speculative preallocation Brian Foster
2014-03-21 16:54 ` Shaun Gosse
2014-03-21 17:09 ` Arkadiusz Miśkiewicz
2014-03-21 18:02 ` Brian Foster
2014-03-21 23:16 ` Dave Chinner
2014-03-21 20:11 ` Florian Weimer
2014-03-21 23:10 ` Dave Chinner [this message]
2014-03-21 23:13 ` Eric Sandeen
2014-03-21 23:18 ` Dave Chinner
2014-03-22 13:32 ` Christoph Hellwig
2014-03-21 23:05 ` Dave Chinner
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=20140321231032.GC1389@dastard \
--to=david@fromorbit.com \
--cc=bfoster@redhat.com \
--cc=fw@deneb.enyo.de \
--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