From: Dave Chinner <david@fromorbit.com>
To: Jef Fox <jef.fox@kinetx.com>
Cc: xfs@oss.sgi.com
Subject: Re: XFS Preallocation
Date: Fri, 28 Jan 2011 15:52:05 +1100 [thread overview]
Message-ID: <20110128045205.GR21311@dastard> (raw)
In-Reply-To: <155CAEA5D902E7429569DD197567724A01534D42@mail1.ad.kinetx.com>
On Thu, Jan 27, 2011 at 07:05:33PM -0700, Jef Fox wrote:
> We are having some problems with preallocation of large files. We have
> found that we can preallocate about 500 1GB files on a volume using the
> resvsp and truncate commands, but the extents are still showing up as
> preallocated. Is this a problem? The OS appears to think the files are
> allocated and correctly sized.
That's the way it's supposed to work. Preallocated space stays
preallocated (i.e reads as zeros) until it is written to, regardless
of whether you change the file size via truncate commands.
> For reference, we are trying to create files for an external piece of
> equipment to write to a SSD with. The SSD would then be mounted in RHEL
> and the data pulled off in the 1G chunks. Because of the nature of the
> data, we need to constantly erase and recreate the files and
> preallocation seems to be the fastest option.
What do you mean by "erase and recreate"? Do you mean you rm the
files, then preallocate them again?
If you were running 2.6.37+ and a TOT xfsprogs, there's also the
"zero" command that converts allocated space back to the
preallocated (zeroed) state without doing any IO. It's the
equivalent unresvsp + resvsp in a single operation.
> We don't really care if
> the data gets 0'ed out. Is there another method - allocsp takes too
> long for this application?
allocsp is historical interface, pretty much useless and should
probably be removed. I can't think of any situation where allocsp
would be better than resvsp or zero....
> Or, does it matter if XFS thinks the extents
> are preallocated but unwritten if no other files are written to the
> disk?
I'm not sure what you are asking there...
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:[~2011-01-28 4:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-28 2:05 XFS Preallocation Jef Fox
2011-01-28 4:52 ` Dave Chinner [this message]
2011-01-28 15:15 ` Jef Fox
2011-01-28 17:33 ` Jef Fox
2011-01-29 0:17 ` Dave Chinner
2011-02-01 4:45 ` Peter Vajgel
2011-02-01 8:03 ` Dave Chinner
2011-02-01 19:20 ` Peter Vajgel
2011-02-01 20:12 ` Stan Hoeppner
2011-02-01 22:47 ` Peter Vajgel
2011-02-02 0:07 ` 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=20110128045205.GR21311@dastard \
--to=david@fromorbit.com \
--cc=jef.fox@kinetx.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