[lkml]   [2006]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Is user-space AIO dead?
--- Phillip Susi <> wrote:
> 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.

The part I am writing looks like a transaction log writer:
Lots of sequential small-ish writes (call each quanta a transaction)
Must be written to stable storage
Must know when the writes are completed
The data is only read back for recovery processing

In the past, the way I found to have worked best is to have a dedicated thread pulling
transactions off a queue and doing the blocking syncronous writes either by write(v)/fsync or
write(v) on a file opened with O_SYNC | O_DIRECT. Once the fsync returned, the thread would
signal completion and grab the next batch to start writing.
This works very well and can easily max out any real device's bandwidth, but incurs more latency
than should be absolutely needed due to the extra context switching from the completion

I am hoping AIO can be used to reduce the latency, but was a bit discouraged after reading the
IBM paper.

I am looking forward to your post reguarding dd.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-01-11 23:04    [W:0.072 / U:3.256 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site