Re: Creating sparse file on XFS and EXT3 has different results
There are no "specs" as to how a sparse file is handled in response to writes. Sparse is mostly beneficial when the holes are very large. If an app really wants to have minimal on disk space, you should pre-allocate space with fallocate. You may even need to hole punch after the writes. Both xfs and ext4 support both fallocate and hole punching. (I don't know the userspace call to hole punch. I think its a relatively new feature for ext4.) Greg On Aug 4, 2011 10:16 PM, "Ashish Sangwan" <ashishsangwan2@gmail.com> wrote:
Apologies for the top post. I simply forgot to not do that. On Aug 5, 2011 8:11 AM, "Greg Freemyer" <greg.freemyer@gmail.com> wrote:
There are no "specs" as to how a sparse file is handled in response to
writes.
Sparse is mostly beneficial when the holes are very large.
If an app really wants to have minimal on disk space, you should
pre-allocate space with fallocate.
You may even need to hole punch after the writes. Both xfs and ext4
support both fallocate and hole punching. (I don't know the userspace call to hole punch. I think its a relatively new feature for ext4.)
Greg
On Aug 4, 2011 10:16 PM, "Ashish Sangwan" <ashishsangwan2@gmail.com>
wrote: Greg
Hole Punch..... That was nice one Greg!!! I would rather try fallocate. On Fri, Aug 5, 2011 at 9:14 PM, Greg Freemyer <greg.freemyer@gmail.com>wrote:
Apologies for the top post. I simply forgot to not do that.
On Aug 5, 2011 8:11 AM, "Greg Freemyer" <greg.freemyer@gmail.com> wrote:
There are no "specs" as to how a sparse file is handled in response to
writes.
Sparse is mostly beneficial when the holes are very large.
If an app really wants to have minimal on disk space, you should
pre-allocate space with fallocate.
You may even need to hole punch after the writes. Both xfs and ext4
support both fallocate and hole punching. (I don't know the userspace call to hole punch. I think its a relatively new feature for ext4.)
Greg
On Aug 4, 2011 10:16 PM, "Ashish Sangwan" <ashishsangwan2@gmail.com>
wrote:
Greg
participants (2)
-
Ashish Sangwan -
Greg Freemyer