linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Lantukh <ilantukh@gridgain.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: aio: Question about durability guarantees
Date: Tue, 12 Jul 2016 16:02:25 +0300	[thread overview]
Message-ID: <CADM=oMYLg34pnJr5-za0d69X7bMpAXrKGxR3dzhtLk6QSHKjnQ@mail.gmail.com> (raw)
In-Reply-To: <20160712120051.GA690@infradead.org>

On Tue, Jul 12, 2016 at 3:00 PM, Christoph Hellwig <hch@infradead.org> wrote:
> On Tue, Jul 12, 2016 at 12:42:28PM +0300, Ilya Lantukh wrote:
>> Hi all,
>>
>> We are considering to use libaio in our project as an optional
>> alternative to Java NIO. Our goal is to improve performance while
>> maintaining durability.
>>
>> We have performed tests on different storage devices. Files were
>> opened with flags: O_WRONLY | O_DIRECT | O_DSYNC. However, on some SSD
>> devices O_DSYNC causes io_submit() to block until operation is
>> finished, which is not acceptable in our case.
>
> What is your exact setup?  Sounds like you're using a file system
> and not a block device node.  Which filesystem shows this behavior?

The filesystem is ext4. Yes, we access file using a file system (like
fd = open("~/test/file0", ...);) and for most devices it works fine.
Does it mean that we need to open a block device directly to get full
advantage of aio?

>
>>
>> The question is: do libaio writes with only WRONLY | O_DIRECT flags
>> provide any durability guarantees?
>
> No, they don't, you need O_DSYNC for that.

Got it, thanks!

-- 
Best regards,
Ilya

  reply	other threads:[~2016-07-12 13:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12  9:42 aio: Question about durability guarantees Ilya Lantukh
2016-07-12 12:00 ` Christoph Hellwig
2016-07-12 13:02   ` Ilya Lantukh [this message]
2016-07-12 15:11     ` Jeff Moyer

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='CADM=oMYLg34pnJr5-za0d69X7bMpAXrKGxR3dzhtLk6QSHKjnQ@mail.gmail.com' \
    --to=ilantukh@gridgain.com \
    --cc=hch@infradead.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).