[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Btrfs best practices



Hi.  I must add the information that I use zswap:

GRUB_CMDLINE_LINUX_DEFAULT="quiet zswap.enabled=1 zswap.zpool=z3fold zswap.compressor=lzo-rle"

Em [2021-12-16 qui 14:13:05-0300], Jorge P. de Morais Neto escreveu:

> Hi!  I own a Dell Inspiron 5570 laptop with 1 TB SATA HDD, a new 250 GB
> NVMe SSD¹ and 16 GiB RAM.  I seek reliability, durability, performance
> and power efficiency.
>
> I do weekly duplicity backups to external 1.5 TB USB3 HDD.  I'll start
> also daily rsyncing some of the SSD data to the SATA HDD.
>
> The SSD will have 50 GB extra over provisioning and a 200 GB partition,
> besides the special UEFI partition.  The SATA HDD will start with 16 GiB
> swap partition then a big partition.  I'll put system and /home on the
> SSD but all XDG user dirs² on the HDD, and tmpfs on /tmp.  All three
> drives will have Btrfs with space_cache=v2, noatime, zstd compression
> and reasonable free breathing space.
>
> I use Gnome and:
> - GNU Emacs
> - notmuch and offlineimap (I may switch to mbsync)
> - GNU IceCat, Mozilla Firefox and ungoogled-chromium
> - Gajim and GNU Jami
> - Gnome Boxes or Virtual Machine Manager running a VM with 2 GiB RAM and
>   one .qcow2 disk image currently weighting 24 GB.
> - mpv
> - Nextcloud (always running but rarely syncing changes)
>
> I use Debian stable with only official repositories, including
> bullseye-backports.  I manually installed GNU Guix package manager and
> have 163 packages on main Guix profile.
>
> * Doubts
> ** Backported kernel
> Should I use a backported kernel as Btrfs [wiki][] recommends?  I worry
> that bullseye-backports comes from Debian testing with poor security.
>
> [wiki]: https://btrfs.wiki.kernel.org/index.php/Getting_started#Before_you_start
>
> ** Strong compression during install
> For lifetime and space saving, I intend to install Debian to the SSD
> with compress-force=zstd:12, but then adopt compress-force=zstd.  Thus
> the installation will be slow---I'll do something else while the
> installer works---but the installed system will be efficient, right?
>
> ** HDD Compression
> Both HDD have a lot of already-compressed data: videos, audio, photos
> and compressed archives and disk images; compress-force would force
> Btrfs to recompress it all, only to discard the recompressed data and
> store the original.  Therefore compress=zstd:4 would be better, right?
>
> ** Fragmentation
> Is fragmentation a concern?  Is the [Gotchas][] article accurate?
>
> [Gotchas]: https://btrfs.wiki.kernel.org/index.php/Gotchas#Fragmentation
>
> ** Subvolumes
> What about
> https://fedoraproject.org/wiki/Changes/BtrfsByDefault#Additional_subvolumes ?
>
> ** Swappiness
> Most performance-critical data will be on the SSD, so there will be much
> less need for RAM caches; therefore I should decrease swappiness
> (especially if I put swap on the SSD), right?  By how much?
>
> * Footnotes
> ¹ A 250 GB WD Blue SN550 rated for 150 TBW.
> ² See the xdg-user-dir manpage.
>
> Kindest regards,
>   Jorge
>
> -- 
> - Many people hate injustice but few check the facts; this causes more
>   injustice.  Ask me about <https://stallmansupport.org>
> - I am Brazilian.  I hope my English is correct and I welcome feedback.
> - https://www.defectivebydesign.org
> - https://www.gnu.org

-- 
- Many people hate injustice but few check the facts; this causes more
  injustice.  Ask me about <https://stallmansupport.org>
- I am Brazilian.  I hope my English is correct and I welcome feedback.
- Free Software Supporter: https://www.fsf.org/free-software-supporter
- If an email of mine arrives at your spam box, please notify me.


Reply to: