From: Trond Myklebust <trond.myklebust@primarydata.com>
To: Zach Brown <zab@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
Sage Weil <sweil@redhat.com>,
Linux FS-devel Mailing List <linux-fsdevel@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Linux API Mailing List <linux-api@vger.kernel.org>
Subject: Re: [PATCH RFC] vfs: add a O_NOMTIME flag
Date: Wed, 6 May 2015 18:14:34 -0400 [thread overview]
Message-ID: <CAHQdGtS0=Gjyq2E2QO+zu_HAzdrHJwxtfZ8MB5q0DjWHMEc7hw@mail.gmail.com> (raw)
In-Reply-To: <1430949612-21356-1-git-send-email-zab@redhat.com>
Hi Zach,
On Wed, May 6, 2015 at 6:00 PM, Zach Brown <zab@redhat.com> wrote:
>
> Add the O_NOMTIME flag which prevents mtime from being updated which can
> greatly reduce the IO overhead of writes to allocated and initialized
> regions of files.
>
> ceph servers can have loads where they perform O_DIRECT overwrites of
> allocated file data and then sync to make sure that the O_DIRECT writes
> are flushed from write caches. If the writes dirty the inode with mtime
> updates then the syncs also write out the metadata needed to track the
> inodes which can add significant iop and latency overhead.
>
> The ceph servers don't use mtime at all. They're using the local file
> system as a backing store and any backups would be driven by their upper
> level ceph metadata. For ceph, slow IO from mtime updates in the file
> system is as daft as if we had block devices slowing down IO for
> per-block write timestamps that file systems never use.
>
> In simple tests a O_DIRECT|O_NOMTIME overwriting write followed by a
> sync went from 2 serial write round trips to 1 in XFS and from 4 serial
> IO round trips to 1 in ext4.
>
> file_update_time() checks for O_NOMTIME and aborts the update if it's
> set, just like the current check for the in-kernel inode flag
> S_NOCMTIME. I didn't update any other mtime update sites. They could be
> added as we decide that it's appropriate to do so.
>
> I opted not to name the flag O_NOCMTIME because I didn't want the name
> to imply that ctime updates would be prevented for other inode changes
> like updating i_size in truncate. Not updating ctime is a side-effect
> of removing mtime updates when it's the only thing changing in the
> inode.
>
> The criteria for using O_NOMTIME is the same as for using O_NOATIME:
> owning the file or having the CAP_FOWNER capability. If we're not
> comfortable allowing owners to prevent mtime/ctime updates then we
> should add a tunable to allow O_NOMTIME. Maybe a mount option?
>
Just out of curiosity, if you need to modify the application anyway,
why wouldn't use of fdatasync() when flushing be able to offer a
similar performance boost?
Cheers
Trond
next prev parent reply other threads:[~2015-05-06 22:14 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 22:00 [PATCH RFC] vfs: add a O_NOMTIME flag Zach Brown
2015-05-06 22:14 ` Trond Myklebust [this message]
2015-05-06 22:19 ` Sage Weil
2015-05-06 22:41 ` Zach Brown
2015-05-06 22:46 ` Sage Weil
2015-05-06 23:21 ` Theodore Ts'o
2015-05-07 0:26 ` Dave Chinner
2015-05-07 17:20 ` Zach Brown
2015-05-07 18:43 ` Zach Brown
2015-05-07 19:09 ` Richard Weinberger
2015-05-07 19:53 ` Andy Lutomirski
[not found] ` <554BC4D8.9010507@nod.at>
2015-05-07 20:06 ` Andy Lutomirski
2015-05-08 2:42 ` Dave Chinner
2015-07-14 11:44 ` Pavel Machek
2015-05-08 1:01 ` Sage Weil
2015-05-08 1:23 ` Trond Myklebust
2015-05-08 15:19 ` Sage Weil
2015-05-08 22:13 ` Dave Chinner
2015-05-08 22:24 ` Sage Weil
2015-05-10 23:13 ` Trond Myklebust
2015-05-11 7:31 ` Dave Chinner
2015-05-11 16:39 ` Sage Weil
2015-05-11 17:12 ` Trond Myklebust
2015-05-11 17:30 ` Sage Weil
2015-05-12 1:21 ` Dave Chinner
2015-05-12 23:12 ` Sage Weil
2015-05-13 0:57 ` Dave Chinner
2015-05-12 13:41 ` John Stoffel
2015-05-11 14:47 ` Theodore Ts'o
2015-05-11 16:24 ` Sage Weil
2015-05-11 23:10 ` Theodore Ts'o
2015-05-12 5:08 ` Kevin Easton
2015-05-12 11:45 ` Austin S Hemmelgarn
2015-05-12 13:54 ` John Stoffel
2015-05-12 14:36 ` J. Bruce Fields
2015-05-12 14:53 ` Austin S Hemmelgarn
2015-05-12 21:51 ` Dave Chinner
2015-05-13 15:16 ` Austin S Hemmelgarn
2015-05-12 22:39 ` NeilBrown
2015-07-14 13:13 ` Pavel Machek
2015-07-15 4:54 ` NeilBrown
2015-07-22 13:47 ` Pavel Machek
2015-05-12 21:35 ` Sage Weil
2015-05-13 12:32 ` Jan Kara
2015-05-08 14:29 ` John Stoffel
2015-07-14 11:50 ` Pavel Machek
2015-05-08 14:43 ` Austin S Hemmelgarn
2015-05-08 17:11 ` Zach Brown
2015-05-08 2:37 ` Dave Chinner
2015-05-08 3:24 ` Andy Lutomirski
2015-05-08 14:44 ` Eric Sandeen
2015-05-11 20:36 ` J. Bruce Fields
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='CAHQdGtS0=Gjyq2E2QO+zu_HAzdrHJwxtfZ8MB5q0DjWHMEc7hw@mail.gmail.com' \
--to=trond.myklebust@primarydata.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sweil@redhat.com \
--cc=viro@zeniv.linux.org.uk \
--cc=zab@redhat.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;
as well as URLs for NNTP newsgroup(s).