[Top] [All Lists]

Re: NOW: o_direct -- WAS: Re: WARNING in xfs_lwr.c, xfs_write()

To: Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
Subject: Re: NOW: o_direct -- WAS: Re: WARNING in xfs_lwr.c, xfs_write()
From: Stewart Smith <stewart@xxxxxxxxxxxxxxxx>
Date: Fri, 28 May 2010 00:05:05 +1000
In-reply-to: <4BFD3926.6040208@xxxxxxxxxxxxxxxxx>
References: <20100523002023.41f5a5c8@xxxxxxxxxxxxxxxxxxxxxxx> <20100523101856.GL2150@dastard> <20100523092344.0fcaab42@xxxxxxxxxxxxxxxxxxxxxxx> <4BF9FCA8.8090906@xxxxxxxxxxxxxxxxx> <20100524143428.6f3a117c@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20100526070620.GT2150@dastard> <4BFD3926.6040208@xxxxxxxxxxxxxxxxx>
User-agent: Notmuch/0.3.1-17-gc50524e (http://notmuchmail.org) Emacs/23.1.1 (x86_64-pc-linux-gnu)
On Wed, 26 May 2010 10:07:18 -0500, Stan Hoeppner <stan@xxxxxxxxxxxxxxxxx> 
> 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

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