public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Joe Hsu <nagual.hsu@gmail.com>
Cc: xfs@oss.sgi.com
Subject: Re: about XFS_IOC_RESVSP
Date: Sun, 24 May 2009 08:29:09 -0500	[thread overview]
Message-ID: <4A194BA5.1010308@sandeen.net> (raw)
In-Reply-To: <7fe205990905221036h71823b2bwf88123a38a406324@mail.gmail.com>

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@sandeen.net>:
>> Joe Hsu wrote: Do you really need the exact same blocks?  What if 
>> you just truncate to 0 & re-allocate?
>> 
>> -Eric
>> 
> 
> 
> 

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2009-05-24 13:28 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-22 14:16 about XFS_IOC_RESVSP Joe Hsu
2009-05-22 15:49 ` Eric Sandeen
2009-05-22 17:36   ` Joe Hsu
2009-05-24 13:29     ` Eric Sandeen [this message]
2009-05-24  7:08 ` Joe Hsu

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=4A194BA5.1010308@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=nagual.hsu@gmail.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