linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ceriel Jacobs <linux-ide@crashplan.pro>
To: linux-btrfs@vger.kernel.org
Subject: Project idea: reduce boot time/RAM usage: option to disable/delay raid6_pq and xor kmod
Date: Sun, 24 Dec 2017 13:31:40 +0100	[thread overview]
Message-ID: <6f082a1d-ed15-2583-fabf-9aa7c80baef0@crashplan.pro> (raw)

dmesg snippet (on Intel E3815 CPU):
[    0.499794] efivars: duplicate variable: Events-...
[    0.560048] raid6: sse2x1   gen()   932 MB/s
[    0.616732] raid6: sse2x1   xor()  1488 MB/s
[    0.673362] raid6: sse2x2   gen()  1665 MB/s
[    0.730014] raid6: sse2x2   xor()  1777 MB/s
[    0.786688] raid6: sse2x4   gen()  2635 MB/s
[    0.843352] raid6: sse2x4   xor()  1732 MB/s
[    0.843355] raid6: using algorithm sse2x4 gen() 2635 MB/s
[    0.843356] raid6: .... xor() 1732 MB/s, rmw enabled
[    0.843358] raid6: using ssse3x2 recovery algorithm
[    0.846998] xor: measuring software checksum speed
[    0.880025]    prefetch64-sse:  4605.600 MB/sec
[    0.913372]    generic_sse:  4176.000 MB/sec
[    0.913375] xor: using function: prefetch64-sse (4605.600 MB/sec)
[    0.952233] Btrfs loaded, crc32c=crc32c-intel
[    0.957669] SCSI subsystem initialized

# lsmod | grep btrfs
btrfs                1323008  3
xor                    24576  1 btrfs
zstd_decompress        94208  1 btrfs
zstd_compress         188416  1 btrfs
raid6_pq              122880  1 btrfs

# modinfo btrfs | grep 'filename:\|depends:'
filename:       /lib/modules/4.14.8-1-ARCH/kernel/fs/btrfs/btrfs.ko.xz
depends:        zstd_compress,zstd_decompress,raid6_pq,xor

---
This system doesn't use raid5 neither raid6 nor any RAID at all.

The wish is that btrfs can be loaded at run-time with/without loading 
kernel modules raid6_pq neither xor.

Saving:
1. ± 0.4 seconds of boot time (10% of boot until root)
2. ± 150k of RAM
3. ± 75k of disk space

For other cases, I can imagine a root system that doesn't need btrfs 
raid, and user data volumes that do use raid6_pq. In such delay cases it 
is welcome that btrfs-noraid can be loaded first, and the raid modules 
and benchmarking during/after init.

New kernel command-line parameters?
a.) disable, like:
     - btrfs=noraid6_pq
     - btrfs=noraid (=no xor at all)
b.) delay raid6_pq and xor module loading, for cases where root mount 
doesn't need raid6_pq and/or xor.

A new entry at https://btrfs.wiki.kernel.org/index.php/Project_ideas is 
welcome.

             reply	other threads:[~2017-12-24 12:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-24 12:31 Ceriel Jacobs [this message]
2017-12-28 20:18 ` Project idea: reduce boot time/RAM usage: option to disable/delay raid6_pq and xor kmod David Disseldorp
2018-01-02 17:55   ` David Sterba

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=6f082a1d-ed15-2583-fabf-9aa7c80baef0@crashplan.pro \
    --to=linux-ide@crashplan.pro \
    --cc=linux-btrfs@vger.kernel.org \
    /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).