unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: Efraim Flashner <efraim@flashner.co.il>
Cc: "Ludovic Courtès" <ludo@gnu.org>,
	"Pierre Neidhardt" <mail@ambrevar.xyz>,
	40236@debbugs.gnu.org,
	"Jonathan Brielmaier" <jonathan.brielmaier@web.de>
Subject: [bug#40236] [PATCH] doc: Suggest Btrfs with compression instead of ext4 for root partition.
Date: Mon, 01 Jun 2020 00:21:20 -0400	[thread overview]
Message-ID: <878sh75scf.fsf@gmail.com> (raw)
In-Reply-To: <20200531075532.GD7397@E5400> (Efraim Flashner's message of "Sun,  31 May 2020 10:55:32 +0300")

Hello!

Efraim Flashner <efraim@flashner.co.il> writes:

> On Sun, May 31, 2020 at 09:39:23AM +0200, Pierre Neidhardt wrote:
>> Now that 37305 is merged, we can revisit this issue.
>>
>> 1. This patch only includes a documentation update.
>> 2. We could make Btrfs the default in the graphical installer.
>> 3. We would probably need to update the tests, at least for the latter.
>>
>> As mentioned above, I think it's safe to enable Btrfs without subvolume,
>> with Zstd compression.
>>
>> For subvolumes, we would need to implement the corresponding tests.
>>
>> Thoughts?
>
> My main concern is the possibility of data loss. I don't know how much
> is FUD and how much is legit so to me it seems safest to see what
> OpenSuSE uses and to mimic that a bit (in terms of not using most of the
> features available).

Except for Btrfs RAID 5 and 6, which are still known to have issues and
are considered experimental, I'd say mostly FUD, although there were
some bugs in Linux 5.1 and 5.2.  As you noted, (Open)SUSE defaults to
Btrfs, and companies such as Synology ship network storage products with
Btrfs on.  If it was that bad, nobody would buy those, and the companies
would stop proudly advertising their use of Btrfs.

> That said, I use btrfs with no subvolumes with compression turned on and
> I'm pretty happy with that.
>
> Two more things:
> /var/guix/db should probably have CoW disabled, as should /tmp

I haven't bothered and my system seems to be doing OK.  When I asked in
#btrfs, people told me to keep CoW unless I was really sure it was a
problem (i.e., run benchmarks), as it implies loosing the checksum
validation and compression.  The command 'man 5 btrfs' also states that
"Updates in-place improve performance for workloads that do frequent
overwrites, at the cost of potential partial writes, in case the write
is interrupted (system crash, device failure).", which doesn't sound
safe to do for something as important as /var/guix/db.

> would the deduplication of btrfs be "better" than the deduplication from
> the daemon?

On my system (with zstd compression), compsize -x /gnu/store suggests
a resounding yes:

--8<---------------cut here---------------start------------->8---
sudo compsize -x /gnu/store
Processed 3479664 files, 954748 regular extents (3002677 refs), 1451082 inline.
Type       Perc     Disk Usage   Uncompressed Referenced
TOTAL       57%       51G          88G         217G
none       100%       32G          32G          81G
zstd        33%       18G          56G         135G
--8<---------------cut here---------------end--------------->8---

The delta between the Uncompressed and Referenced column is attributed
to the deduplication done by Btrfs, and provides massive space savings
in my case (this is just for /gnu/store).

I'd need 217 GiB over a traditional fs such as EXT4 to hold my current
store, while an uncompressed Btrfs partition would use only 88 GiB.
With zstd compression, it's down to 51 GiB, or less that a quarter of
what would have been required using EXT4.

Maxim




  reply	other threads:[~2020-06-01  4:22 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26  8:35 [bug#40236] [PATCH] doc: Suggest Btrfs with compression instead of ext4 for root partition Pierre Neidhardt
2020-03-31  1:52 ` Maxim Cournoyer
2020-03-31  7:52   ` Pierre Neidhardt
2020-03-31 14:53   ` Pierre Neidhardt
2020-03-31 23:20     ` Maxim Cournoyer
2020-04-01  7:00       ` Pierre Neidhardt
2020-05-02 13:29         ` Pierre Neidhardt
2020-05-02 13:50           ` Marius Bakke
2020-05-02 13:58             ` Pierre Neidhardt
2020-05-02 19:03               ` Maxim Cournoyer
2020-05-03  7:01                 ` Pierre Neidhardt
2020-05-04 15:22                   ` Maxim Cournoyer
2020-04-01 21:28   ` Ludovic Courtès
2020-04-02  7:15     ` Pierre Neidhardt
2020-04-02  8:04       ` Ludovic Courtès
2020-04-02 10:36         ` Jonathan Brielmaier
2020-04-04  1:28         ` Maxim Cournoyer
2020-04-06 20:20           ` Pierre Neidhardt
2020-04-06 20:42             ` Jonathan Brielmaier
2020-04-07  7:07               ` Pierre Neidhardt
2020-04-08  3:18                 ` Maxim Cournoyer
2020-04-09 20:12                   ` Efraim Flashner
2020-04-10  7:39                     ` Pierre Neidhardt
2020-04-10  8:24                       ` Efraim Flashner
2020-04-10  9:04                         ` Pierre Neidhardt
2020-04-14  2:20                           ` Maxim Cournoyer
2020-04-14  6:53                             ` Pierre Neidhardt
2020-05-31  7:39                               ` Pierre Neidhardt
2020-05-31  7:55                                 ` Efraim Flashner
2020-06-01  4:21                                   ` Maxim Cournoyer [this message]
2020-06-01  6:16                                     ` Efraim Flashner
2020-06-01  7:48                                       ` Pierre Neidhardt
2020-06-01 18:29                                         ` Maxim Cournoyer
2020-05-31 21:07                                 ` Ludovic Courtès
2020-06-01  5:03                                   ` Maxim Cournoyer
2020-06-02 13:37                                   ` Pierre Neidhardt
2020-06-03 20:00                                     ` bug#40236: " Ludovic Courtès
2020-06-04  9:17                                       ` [bug#40236] " Pierre Neidhardt
2020-06-01  4:49                                 ` Maxim Cournoyer
2020-03-31 12:09 ` Jonathan Brielmaier

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878sh75scf.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=40236@debbugs.gnu.org \
    --cc=efraim@flashner.co.il \
    --cc=jonathan.brielmaier@web.de \
    --cc=ludo@gnu.org \
    --cc=mail@ambrevar.xyz \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).