xfs
[Top] [All Lists]

Re: XFS Preallocate using ALLOCSP

To: Smit Shah <getsmit@xxxxxxxxx>
Subject: Re: XFS Preallocate using ALLOCSP
From: Felix Blyakher <felixb@xxxxxxx>
Date: Tue, 16 Jun 2009 17:26:06 -0500
Cc: Eric Sandeen <sandeen@xxxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: <8770d98c0906161442t634467bxe8b0f5c32b49502e@xxxxxxxxxxxxxx>
References: <24042506.post@xxxxxxxxxxxxxxx> <4A3712BF.7030101@xxxxxxxxxxx> <8770d98c0906152344p185533a9rc144a5667d13d2de@xxxxxxxxxxxxxx> <4A37B744.9030301@xxxxxxxxxxx> <0B774481-16A5-42FC-89C3-91096E59E861@xxxxxxx> <8770d98c0906161028j1cc5cbadl49d30092fddf3dbe@xxxxxxxxxxxxxx> <B7C1A222-58C5-4858-80B4-F871BF088DB1@xxxxxxx> <8770d98c0906161442t634467bxe8b0f5c32b49502e@xxxxxxxxxxxxxx>

On Jun 16, 2009, at 4:42 PM, Smit Shah wrote:

On 6/16/09, Felix Blyakher <felixb@xxxxxxx> wrote:

On Jun 16, 2009, at 12:28 PM, Smit Shah wrote:
but the write performance is going to suffer.

It's not clear why it should. Not doing preallocation doesn't
mean that there is no inode updates with every write. Why
would extent conversion be more expensive that creating the
space (extent) and updating the inode size for every write?
It'd interesting to reproduce your results. Any details on
your tests and the iometer usage?

Since fallocate uses the RESVSP cmd for xfs. And as given given for
RESVSP in man page for xfsctl
If the  XFS filesystem  is  configured to flag unwritten file extents,

Good point, we should update the man page, there is no 'if'
any more.


performance will be negatively affected when writing to preallocated
space, since extra filesystem transactions are required to convert
extent  flags  on  the  range  of  the  file  written.

Yes, absolutely, there is overhead to handle unwritten
extents, no doubt. My remark was wrt comparison between
not doing preallocation at all and preallocation with
unwritten extents. Both cases would incur the metadata
updates with every write. And I doubt that write performance
would suffer more in the preallocation case.
Though, if you prefer to trade extra time spent at every
write to setup time, you can/should manually fill the
file with zeros.

Felix

<Prev in Thread] Current Thread [Next in Thread>