public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: Gim Leong Chin <chingimleong@yahoo.com.sg>
Cc: xfs@oss.sgi.com
Subject: Re: allocsize mount option
Date: Mon, 11 Jan 2010 12:16:08 -0600	[thread overview]
Message-ID: <4B4B6AE8.8070904@sandeen.net> (raw)
In-Reply-To: <614476.89961.qm@web76214.mail.sg1.yahoo.com>

Gim Leong Chin wrote:
> Hi,
> 
> Mount options for xfs allocsize=size Sets  the buffered I/O
> end-of-file preallocation size when doing delayed allocation writeout
> (default size is 64KiB).
> 
> 
> I read that setting allocsize to a big value can be used to combat
> filesystem fragmentation when writing big files.

That's not universally necessary though, depending on how you are
writing them.  I've only used it in the very specific case of mythtv
calling "sync" every couple seconds, and defeating delalloc.

> I do not understand how allocsize works.  Say I set allocsize=1g, but
> my file size is only 1 MB or even smaller.  Will the rest of the 1 GB
> file extent be allocated, resulting in wasted space and even file
> fragmentation problem?

possibly :)  It's only speculatively allocated, though, so you won't
have 1g for every file; when it's closed the preallocation goes
away, IIRC.

> Does setting allocsize to a big value result in performance gain when
> writing big files?  Is performance hurt by a big value setting when
> writing files smaller than the allocsize value?
> 
> I am setting up a system for HPC, where two different applications
> have different file size characteristics, one writes files of GBs and
> even 128 GB, the other is in MBs to tens of MBs.

We should probably back up and say:  are you seeing fragmentation
problems -without- the mount option, and if so, what is your write pattern?

-Eric

> I am not able to find documentation on the behaviour of allocsize
> mount option.
> 
> Thank you.
> 
> 
> Chin Gim Leong
> 
> 
> New Email names for you! Get the Email name you&#39;ve always wanted
> on the new @ymail and @rocketmail. Hurry before someone else does! 
> http://mail.promotions.yahoo.com/newdomains/sg/
> 
> _______________________________________________ xfs mailing list 
> xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs
> 

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

  reply	other threads:[~2010-01-11 18:15 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-11 17:25 allocsize mount option Gim Leong Chin
2010-01-11 18:16 ` Eric Sandeen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2010-01-13  9:42 Gim Leong Chin
2010-01-13 10:50 ` Dave Chinner
2010-01-14 17:25 Gim Leong Chin
2010-01-14 17:42 ` Eric Sandeen
2010-01-14 23:28 ` Dave Chinner
2010-01-15  3:08 Gim Leong Chin
2010-01-24  6:44 Gim Leong Chin
2010-09-28 18:53 Ivan.Novick
2010-09-29  0:31 ` Dave Chinner
2011-01-20 20:41 Peter Vajgel
2011-01-21  0:48 ` 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=4B4B6AE8.8070904@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=chingimleong@yahoo.com.sg \
    --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