From: Dave Chinner <david@fromorbit.com>
To: "amit.sahrawat83@gmail.com" <amit.sahrawat83@gmail.com>
Cc: "hch@infradead.org" <hch@infradead.org>,
"xfs@oss.sgi.com" <xfs@oss.sgi.com>
Subject: Re: Preallocation with direct IO?
Date: Fri, 30 Dec 2011 07:57:45 +1100 [thread overview]
Message-ID: <20111229205745.GH12731@dastard> (raw)
In-Reply-To: <4efc665b.d139e30a.2f32.fffff97a@mx.google.com>
On Thu, Dec 29, 2011 at 01:10:49PM +0000, amit.sahrawat83@gmail.com wrote:
> Hi, I am using a test setup which is doing write using multiple
> threads using direct IO. The buffer size which is used to write is
> 512KB. After continously running this for long duration - i
> observe that number of extents in each file is getting
> huge(2K..4K..). I observed that each extent is of 512KB(aligned to
> write buffer size). I wish to have low number of extents(i.e,
> reduce fragmentation)... In case of buffered IO- preallocation
> works good alongwith the mount option 'allocsize'. Is there
> anything which can be done for Direct IO? Please advice for
> reducing fragmentation with direct IO.
Direct IO does not do any implicit preallocation. The filesystem
simply gets out of the way of direct IO as it is assumed you know
what you are doing.
i.e. you know how to use the fallocate() or ioctl(XFS_IOC_RESVSP64)
calls to preallocate space or to set up extent size hints to use
larger allocations than the IO being done during syscalls...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2011-12-29 20:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-29 13:10 Preallocation with direct IO? amit.sahrawat83
2011-12-29 20:57 ` Dave Chinner [this message]
2011-12-30 3:07 ` Amit Sahrawat
2011-12-30 20:43 ` Dave Chinner
2011-12-31 12:46 ` Amit Sahrawat
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=20111229205745.GH12731@dastard \
--to=david@fromorbit.com \
--cc=amit.sahrawat83@gmail.com \
--cc=hch@infradead.org \
--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