public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: Dave Chinner <david@fromorbit.com>
Cc: "Elliott, Robert (Persistent Memory)" <elliott@hpe.com>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	Jan Kara <jack@suse.cz>
Subject: Re: xfs over pmem - cp performance
Date: Tue, 12 Jan 2016 10:31:02 -0700	[thread overview]
Message-ID: <20160112173102.GA10519@linux.intel.com> (raw)
In-Reply-To: <20160108220328.GB10456@dastard>

On Sat, Jan 09, 2016 at 09:03:28AM +1100, Dave Chinner wrote:
> On Fri, Jan 08, 2016 at 09:07:27PM +0000, Elliott, Robert (Persistent Memory) wrote:
> > I tried using cp to copy the linux git tree between
> > pmem devices like this:
> >                 cp -r /mnt/xfs-pmem1/linux /mnt/xfs-pmem2
> > 
> > The time taken by various filesystems varies (4.4-rc5):
> > * xfs    w/dax: 42 s
> > * xfs   no dax: 14 s
> > * ext4   w/dax:  7 s
> > * ext4  no dax: 15 s
> > * btrfs no dax: 18 s
> 
> Yes, we know.
> 
> > mount options:
> > * /dev/pmem1 on /mnt/xfs-pmem1 type xfs (rw,relatime,seclabel,attr2,dax,inode64,noquota)
> > * /dev/pmem1 on /mnt/ext4-pmem1 type ext4 (rw,relatime,seclabel,dax,data=ordered)
> > * /dev/pmem1 on /mnt/btrfs-pmem1 type btrfs (rw,relatime,seclabel,ssd,space_cache,subvolid=5,subvol=/)
> > 
> > xfs with dax spends most of the time in clear_page_c_e and
> > dax-clear_blocks (from "perf top"): 
> >   30.06%  [kernel]            [k] clear_page_c_e        
> >   12.24%  [kernel]            [k] dax_clear_blocks      
> 
> That's where the difference is - XFS is zeroing the blocks during
> allocation so that we know that a failed write or crash during a
> write will not expose stale data to the user. I've made comment
> about this previously here:
> 
> http://oss.sgi.com/archives/xfs/2015-11/msg00021.html
> 
> and it's a result of the current "everything is synchronous" DAX cpu
> cache control behaviour.
> 
> I think it's worth noting that ext4 is not spending any time
> zeroing the blocks during allocation, which I think means that it
> can expose stale data as a result of a crash or partial write....

Jan's patch series that does the zeroing for newly allocated blocks in ext4
hasn't been merged yet, and is queued for v4.5 inclusion:

https://git.kernel.org/cgit/linux/kernel/git/tytso/ext4.git/log/

My guess is that once this set is included the ext4 overhead for block zeroing
will go up.  If you're testing v4.4 code the zeroing for newly allocated
blocks with ext4 is still happening inside of DAX.

> We're working on fixing this, but it needs all the fsync patches
> from Ross to enable us to turn off the synchronous cache flushes
> in the DAX IO code.
> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> david@fromorbit.com
> _______________________________________________
> Linux-nvdimm mailing list
> Linux-nvdimm@lists.01.org
> https://lists.01.org/mailman/listinfo/linux-nvdimm

      reply	other threads:[~2016-01-12 17:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 21:07 xfs over pmem - cp performance Elliott, Robert (Persistent Memory)
2016-01-08 22:03 ` Dave Chinner
2016-01-12 17:31   ` Ross Zwisler [this message]

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=20160112173102.GA10519@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=david@fromorbit.com \
    --cc=elliott@hpe.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.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