All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hugo Mills <hugo@carfax.org.uk>
To: Marat Khalili <mkh@rqc.ru>
Cc: linux-btrfs@vger.kernel.org, Henk Slager <eye1tm@gmail.com>,
	Duncan <1i5t5.duncan@cox.net>,
	"Austin S. Hemmelgarn" <ahferroin7@gmail.com>,
	A L <crimsoncottage@gmail.com>
Subject: Re: Is autodefrag recommended? -- re-duplication???
Date: Tue, 5 Sep 2017 14:39:14 +0000	[thread overview]
Message-ID: <20170905143914.GB23980@carfax.org.uk> (raw)
In-Reply-To: <82e453bf-ff11-a911-c432-3e0173b223b2@rqc.ru>

[-- Attachment #1: Type: text/plain, Size: 1061 bytes --]

On Tue, Sep 05, 2017 at 05:01:10PM +0300, Marat Khalili wrote:
> Dear experts,
> 
> At first reaction to just switching autodefrag on was positive, but
> mentions of re-duplication are very scary. Main use of BTRFS here is
> backup snapshots, so re-duplication would be disastrous.
> 
> In order to stick to concrete example, let there be two files, 4KB
> and 4GB in size, referenced in read-only snapshots 100 times each,
> and some 4KB of both files are rewritten each night and then another
> snapshot is created (let's ignore snapshots deletion here). AFAIU
> 8KB of additional space (+metadata) will be allocated each night
> without autodefrag. With autodefrag will it be perhaps 4KB+128KB or
> something much worse?

   I'm going for 132 KiB (4+128).

   Of course, if there's two 4 KiB writes close together, then there's
less overhead, as they'll share the range.

   Hugo.

-- 
Hugo Mills             | Once is happenstance; twice is coincidence; three
hugo@... carfax.org.uk | times is enemy action.
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

      reply	other threads:[~2017-09-05 14:39 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-04  9:31 Is autodefrag recommended? Marat Khalili
2017-09-04 10:23 ` Henk Slager
2017-09-04 10:34 ` Duncan
2017-09-04 11:09   ` Henk Slager
2017-09-04 22:27     ` Duncan
2017-09-04 10:54 ` Hugo Mills
2017-09-05 11:45   ` Austin S. Hemmelgarn
2017-09-05 12:49     ` Henk Slager
2017-09-05 13:00       ` Austin S. Hemmelgarn
2017-09-05 12:36 ` A L
2017-09-05 14:01 ` Is autodefrag recommended? -- re-duplication??? Marat Khalili
2017-09-05 14:39   ` Hugo Mills [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=20170905143914.GB23980@carfax.org.uk \
    --to=hugo@carfax.org.uk \
    --cc=1i5t5.duncan@cox.net \
    --cc=ahferroin7@gmail.com \
    --cc=crimsoncottage@gmail.com \
    --cc=eye1tm@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=mkh@rqc.ru \
    /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.