linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Mamedov <rm@romanrm.net>
To: Paul Jones <paul@pauljones.id.au>
Cc: Hans van Kranenburg <hans.van.kranenburg@mendix.com>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: About free space fragmentation, metadata write amplification and (no)ssd
Date: Sun, 9 Apr 2017 13:43:15 +0500	[thread overview]
Message-ID: <20170409134315.30246cea@natsu> (raw)
In-Reply-To: <SY3PR01MB0971BB9CC9DE8501D2132CD19E0E0@SY3PR01MB0971.ausprd01.prod.outlook.com>

On Sun, 9 Apr 2017 06:38:54 +0000
Paul Jones <paul@pauljones.id.au> wrote:

> -----Original Message-----
> From: linux-btrfs-owner@vger.kernel.org [mailto:linux-btrfs-owner@vger.kernel.org] On Behalf Of Hans van Kranenburg
> Sent: Sunday, 9 April 2017 6:19 AM
> To: linux-btrfs <linux-btrfs@vger.kernel.org>
> Subject: About free space fragmentation, metadata write amplification and (no)ssd
> 
> > So... today a real life story / btrfs use case example from the trenches at work...
> 
> Snip!!
> 
> Great read. I do the same thing for backups on a much smaller scale and it works brilliantly.  Two 4T drives in btrfs raid1.
> I will mention that I recently setup caching using LLVM (1 x 300G ssd for each 4T drive), and it's extraordinary how much of a difference it makes. Especially when running deduplication. If it's feasible perhaps you could try it with a nvme drive.

You mean LVM, not LLVM :)

I was actually going to suggest that as well, in my case I use a 32GB SSD
cache for my entire 14TB filesystem with 15 GB metadata (*2 in DUP). In fact
you should check the metadata size on yours, most likely you can get by with
an order of magnitude smaller cache for exactly the same benefit (and have the
rest of 2x300GB for other interesting uses).

And yeah it's amazing, especially when deleting old snapshots or doing
backups. In my case I backup the entire root FS from about 30 hosts, and keep
that in periodic snapshots for a month. Previously I would also stagger rsync
runs so that no more than 4 or 5 hosts get backed up at the same time (and
still there would be tons of trashing in seeks and iowait), now it's no
problem whatsoever.

The only issue that I have with this setup is you need to "cleanly close" the
cached LVM device on shutdown/reboot, and apparently there is no init script
in Debian that would do that (experimenting with adding some hacks, but no
success yet). So on every boot the entire cache is marked dirty and data is
being copied from cache to the actual storage, which takes some time, since
this appears to be done in a random IO pattern.

-- 
With respect,
Roman

  reply	other threads:[~2017-04-09  8:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-08 20:19 About free space fragmentation, metadata write amplification and (no)ssd Hans van Kranenburg
2017-04-08 21:55 ` Peter Grandi
2017-04-09  0:21   ` Hans van Kranenburg
2017-04-09  0:39     ` Hans van Kranenburg
2017-04-09  3:14     ` Kai Krakow
2017-04-09 20:48       ` Hans van Kranenburg
2017-04-09  6:38 ` Paul Jones
2017-04-09  8:43   ` Roman Mamedov [this message]
2017-04-09 18:10 ` Chris Murphy
2017-04-09 20:15   ` Hans van Kranenburg
2017-04-10 12:23 ` Austin S. Hemmelgarn
2017-04-10 22:59   ` Hans van Kranenburg
2017-04-11 11:33     ` Austin S. Hemmelgarn
2017-04-11 13:13       ` Kai Krakow
2017-05-28  0:59 ` Hans van Kranenburg
2017-05-28  3:54   ` Duncan
2017-06-08 17:57   ` Hans van Kranenburg
2017-06-08 18:47     ` Roman Mamedov
2017-06-08 19:19       ` Hans van Kranenburg

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=20170409134315.30246cea@natsu \
    --to=rm@romanrm.net \
    --cc=hans.van.kranenburg@mendix.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=paul@pauljones.id.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 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).