public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Phillip Susi <psusi@cfl.rr.com>
To: Kenny Simpson <theonetruekenny@yahoo.com>
Cc: David Lloyd <dmlloyd@tds.net>,
	linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Is user-space AIO dead?
Date: Wed, 11 Jan 2006 15:31:04 -0500	[thread overview]
Message-ID: <43C56B08.2000908@cfl.rr.com> (raw)
In-Reply-To: <20060111192056.67364.qmail@web34113.mail.mud.yahoo.com>

It is not possible to use non blocking IO with O_DIRECT, because the 
kernel does not buffer the data, and once the write() call returns, the 
kernel can not touch the caller's buffer any more.  The idea of O_DIRECT 
is that the hardware can directly DMA from the caller's buffer, so if 
you want to keep the hardware busy, you need to use async IO so the 
hardware always has some work to do. 

I actually hacked up dd to use async IO ( via io_submit ) in conjunction 
with O_DIRECT and it did noticeably improve ( ~10% ish ) both throughput 
and cpu utilization.  I have an OO.o spreadsheet showing the results of 
some simple benchmarking with various parameters I did at home, which I 
will post later this evening. 

Of course, dd is a simplistic case of sequential IO.  If you have 
something like a big database that needs to concurrently handle dozens 
or hundreds of random IO requests at once, O_DIRECT async IO is 
definitely going to be a clear winner. 

Kenny Simpson wrote:
> Right, but I'm not sure O_DIRECT implies stable storage, only data sent out to the device, not
> held up in the page cache (I could be wrong).
>
> AIO is implemented for O_DIRECT according to the paper, but they observed it not having benefit.
>
> AIO being implemented to O_SYNC would be nice for my use, as it would also eliminate the extra
> alignment restrictions brought on by O_DIRECT.
>
> -Kenny
>
>   


  reply	other threads:[~2006-01-11 20:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11 18:12 Is user-space AIO dead? Kenny Simpson
2006-01-11 18:20 ` Marcin Dalecki
2006-01-11 18:23 ` David Lloyd
2006-01-11 18:45   ` Kenny Simpson
2006-01-11 19:10     ` David Lloyd
2006-01-11 19:20       ` Kenny Simpson
2006-01-11 20:31         ` Phillip Susi [this message]
2006-01-11 22:02           ` Kenny Simpson
2006-01-12  3:50             ` Phillip Susi
2006-01-12  4:14               ` Phillip Susi
2006-01-11 18:41 ` Benjamin LaHaise
2006-01-11 18:54   ` Kenny Simpson

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=43C56B08.2000908@cfl.rr.com \
    --to=psusi@cfl.rr.com \
    --cc=dmlloyd@tds.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=theonetruekenny@yahoo.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