NOW: o_direct -- WAS: Re: WARNING in xfs_lwr.c, xfs_write()
Stewart Smith
stewart at flamingspork.com
Thu May 27 09:05:05 CDT 2010
On Wed, 26 May 2010 10:07:18 -0500, Stan Hoeppner <stan at hardwarefreak.com> wrote:
> Please educate the ignorant a little bit Dave. I'm not a programmer, or at
> least, haven't been one for a couple of decades. If o_direct is superior to
> mmap, why then don't, say, Postfix and Dovecot use it instead of mmap? Email
> servers are some of the most disk I/O bound applications on the planet. I
> would think on heavily loaded mail servers (smtp or imap), at $big_isp for
> example, buffer cache would yield very little performance gain, and may even
> slow the system down due to buffer cache thrashing.
email servers are metadata heavy workloads, not data heavy. They do lots
of create/rename/delete of small files.
O_DIRECT requires you to do IO in multiples of 512bytes aligned to
512byte boundaries.
things like email servers... generally don't need/do that.
Database servers tend to do that, so they use O_DIRECT.
Also, email smtpd delivering a message on a machine, you could quite
likely have imapd come along and read that soon after, so using the
cache makes sense.
> Why do you think Wietse and Timo don't use o_direct instead of mmap? Timo is
> working on a complex and aggressive totally asynchronous I/O subsystem for a
> future Dovecot release in an effort to speed up I/O on loaded systems. Could
> o_direct not be the solution? AFAIK, both Postfix and Dovecot support running
> on just about every Unix like OS on the planet. Is o_direct not a portable
> interface, limited to Linux only? Is o_direct a POSIX standard?
not posix.
but you can get the functionality out of linux through opening with
O_DIRECT, solaris by doing o_direct(), and who cares about the rest :)
--
Stewart Smith
More information about the xfs
mailing list