linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Duncan <1i5t5.duncan@cox.net>
To: Roman Mamedov <rm@romanrm.net>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: Questions on incremental backups
Date: Fri, 18 Jul 2014 05:34:22 -0700	[thread overview]
Message-ID: <20140718053422.78784982@ws> (raw)
In-Reply-To: <TmvW1o01t4NXQGV01mvYsU>

On Fri, 18 Jul 2014 16:55:26 +0600
Roman Mamedov <rm@romanrm.net> wrote:

> On Fri, 18 Jul 2014 10:45:37 +0000 (UTC)
> Duncan <1i5t5.duncan@cox.net> wrote:
> 
> > Russell Coker posted on Fri, 18 Jul 2014 14:35:20 +1000 as
> > excerpted:
> > 
> > > Daily snapshots work welk with kernel 3.14 and above (I had
> > > problems with 3.13 and previous). I have snapshots every 15 mins
> > > on some subvols.
> > > 
> > > Very large numbers of snapshots can cause performance problems. I
> > > suggest keeping below 1000 snapshots at this time.
> > 
> > The other caveat with btrfs snapshots is how they deal with NOCOW
> > files, the usual workaround recommended for large (Gig-ish-plus)
> > internal- rewrite-pattern files such as databases and VM images.
> 
> And "how" do they deal with them? To the best of my knowledge there
> is no "caveat" whatsoever, NOCOW and snapshots interact perfectly,
> exactly as it should be (snapshotted and then changed bits get
> COW'ed, but only once).

Yes, but the fact that NOCOW files must never-the-less be COWed anyway
on the first write to a block after a snapshot isn't exactly intuitive
to many admins, and even to many list regulars until relatively
recently.

For some time the recommendation for active large database files and
VM images (the ones I mentioned) was to make them NOCOW in ordered to
avoid extreme fragmentation, and people were still reporting extreme
fragmentation and the related performance issues even when the files
were properly NOCOWed at creation. Turned out the reason was that they
had scripted auto-snapshotting enabled, sometimes snapshotting the
files as often as once a minute!  With an active VM writing data more
or less randomly to its image equally often, NOCOW lost its
effectiveness as the snapshotting was forcing COW writes most of the
time anyway!

In the context of frequent snapshots, NOCOW is in practice broken
and doesn't do what the label would indicate, thus the caveat.

Effectively, admins can choose NOCOW XOR frequent-snapshotting, altho
the fact that snapshots stop at subvolume borders can be used as a
partial workaround, by putting NOCOW files on a dedicated partition and
not snapshotting it, exactly as I mentioned.

-- 
Duncan - No HTML messages please, as they are filtered as spam.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

  parent reply	other threads:[~2014-07-18 13:14 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17 20:12 Questions on incremental backups Sam Bull
2014-07-18  4:35 ` Russell Coker
2014-07-18  7:36   ` Bob Williams
2014-07-18 10:45   ` Duncan
2014-07-18 10:55     ` Roman Mamedov
     [not found]     ` <TmvW1o01t4NXQGV01mvYsU>
2014-07-18 12:34       ` Duncan [this message]
2014-07-18 13:05         ` Roman Mamedov
2014-07-18 14:28           ` Imran Geriskovan
2014-07-18 12:56   ` Sam Bull
2014-07-18 13:40     ` Russell Coker
2014-07-18 14:27       ` Mike Hartman
2014-07-20 16:56         ` Sam Bull
2014-07-18 17:31       ` Daniel Mizyrycki

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=20140718053422.78784982@ws \
    --to=1i5t5.duncan@cox.net \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=rm@romanrm.net \
    /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).