All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Peer Lorenz <peer.loz@gmx.net>
To: russell@coker.com.au
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Is it safe or useful to use NOCOW flag and autodefrag mount option at same time?
Date: Tue, 17 Mar 2015 23:00:00 +0100	[thread overview]
Message-ID: <1426629600.26870.15.camel@ayida> (raw)
In-Reply-To: <201503162246.12052.russell@coker.com.au>

Am Montag, den 16.03.2015, 22:46 +1100 schrieb Russell Coker:
> On Sun, 15 Mar 2015, peer.loz@gmx.net wrote:
> > Following common recommendations [1], I use these mount options on my
> > main developing machine: noatime,autodefrag. This is desktop machine and
> > it works well so far. Now, I'm also going to install several KVM virtual
> > machines on this system. I want to use qcow2 files stored on SSD with a
> > btrfs on it. In order to avoid bad performance with the VMs, I want to
> > disable the Copy-On-Write mechanism on the storage directory of my VM
> > images as for example described in [2].
> 
> Why do you expect a great performance benefit from that?
> 
> As there is no real seek time SSDs probably won't give you much benefit from 
> defragmenting.  As for disabling CoW, that will reduce the number of writes 
> (as you don't need to write the metadata all the way up the tree) and improve 
> performance, but not as much as on spinning media where you need to do seeks 
> for all that.
> 
> Finally having checksums on everything to give the possibility of recognising 
> corrupt data is a really good feature and something that you want on your VM 
> images.
> 
> So far I have never even tried disabling CoW or using auto defragment.  All of 
> my BTRFS filesystems have either low performance or run on SSD.
> 
Thanks for your reply.

Maybe performance wasn't the right wording. My concern is not only about
speed. Rather, my impression is that even on SSDs fragmentation can
cause problems due to limitations in IOPs and CPU, as for example stated
here [1] (... causing ... excessive multi-second spikes of CPU load on
systems with an SSD ...) and here [2]. This is in particular true for
vm images with several GiB of size ([3], [4]). Since vm images (qcow2?)
do their own checksumming it is considered ok to turn CoW of to reduce
the problems with these files.

As you see, I'm still a bit lost what the best setup would be?
Thanks.


[1] https://btrfs.wiki.kernel.org/index.php/Gotchas 
[2] http://www.spinics.net/lists/linux-btrfs/msg41833.html
[3] http://www.spinics.net/lists/linux-btrfs/msg41049.html
[4] https://bugzilla.redhat.com/show_bug.cgi?id=689127




      parent reply	other threads:[~2015-03-17 22:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-14 18:36 Is it safe or useful to use NOCOW flag and autodefrag mount option at same time? peer.loz
2015-03-15  9:09 ` Wang Shilong
2015-03-17 23:01   ` Goffredo Baroncelli
2015-03-17 23:16     ` Chris Murphy
2015-03-18  1:22       ` Duncan
2015-03-16 11:46 ` Russell Coker
2015-03-16 13:56   ` Austin S Hemmelgarn
2015-03-17 22:00   ` Jean-Peer Lorenz [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=1426629600.26870.15.camel@ayida \
    --to=peer.loz@gmx.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=russell@coker.com.au \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.