xfs
[Top] [All Lists]

Re: about XFS_IOC_RESVSP

To: Joe Hsu <nagual.hsu@xxxxxxxxx>
Subject: Re: about XFS_IOC_RESVSP
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Sun, 24 May 2009 08:29:09 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <7fe205990905221036h71823b2bwf88123a38a406324@xxxxxxxxxxxxxx>
References: <7fe205990905220716v7d06b9bch40fe6136af17e345@xxxxxxxxxxxxxx> <4A16C97A.2020909@xxxxxxxxxxx> <7fe205990905221036h71823b2bwf88123a38a406324@xxxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.21 (Macintosh/20090302)
Joe Hsu wrote:
> Well, I have multiple processes running concurrently, and each writes
>  on its own files( the sort of files I mentioned), while at the same 
> time, I have other programs doing normal but light I/O to other files
> on the same xfs partition.
> 
> Once I thought maybe I can pre-allocate these special files within a 
> directory, which has fixed allocation groups(I guess that means fixed
> sets of blocks), and then I can try to make 'truncate to 0 and 
> pre-allocate' requests sequential for the running processes. But, XFS
> seems to have this feature, I cannot find how to do that.

There is no interface to re-mark existing blocks as unwritten, I'm
afraid.  It sounds like an interesting interface, but it's not there
today AFAIK.

You said:

> Why am I doing this? Why not just over-write it? When doing partial 
> over-writing, some blocks may be read for partial update before they
>  are written out. This hurts some IO performance

I guess it's not possible for you to do whole-block IO instead?  Or even
pad out the writes to block boundaries if needed?

and:

> After days of testing(I only ftruncate to 0 and re-preallocate files 
> if needed), fragmentation become much more serious, sigh

It's interesting that it's so bad, I'd have hoped that if you free a
contiguous chunk of blocks and then immediately reallocate them on the
same inode, that they'd get preallocated nicely.... How bad is it?

-Eric

> 2009/5/22 Eric Sandeen <sandeen@xxxxxxxxxxx>:
>> Joe Hsu wrote: Do you really need the exact same blocks?  What if 
>> you just truncate to 0 & re-allocate?
>> 
>> -Eric
>> 
> 
> 
> 

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