-
Notifications
You must be signed in to change notification settings - Fork 65
Description
I'll revisit this issue and update this post with details as I gather information along.
First sharing current frozen screen waiting for system to deal with iowait and writing changes to disk after having ran beesd on qubesos deployed with qusal; which means a lot of clones were created from base minimal templates then specialized with different packages installed in derived templates and where origin of clone also were updated. This means the origin of the clones were intact origin of clones, then those disk images in reflink pool diverged, and where bees deduped extents that were the same.
Notes:
- Qubesos rotates its cow snapshots at boot and shutdown of its Xen qubes, keeping "dirty" cow disks at qube runtime and effectively providing revertible snapshots through their
qvm-volume revert qube:volumehelper. This permits the end user to revert up to two states of a qube after having shutdown it after realizing he did a stupid mistake, eg wiping ~/, for up to two subsequent reboot of a qube without needing to rely on backups to restore files/disk image states. - This qubesos deployment deploys qusal salt recipes, which fist download debian-minimal and fedora-minimal templates, and then clones them prior of specializing them for different use cases.
- the current iowait explosion resulted from updating QubesOS templates in parallel from command line, where same extents are being accessed by most of the template clones resulting in a total non responsive system. Also note that I'm using wyng-backup to push/receive delta of block level disk images, where wyng also creates snapshots of its own staying at the last backup disk state to easily diff current disk image state against to produce its changeset which is what is being sent as volume to archive.
- As a result of qubesos standard qvm-volume, wyng and qusal combination, nonetheless to say that a parent disk image is (qube=appvm/templates/wyng snapshots) are exact same origin copies in time of a disk image that diverge over time.
- From testing, beesd in this scenario is more efficient in scan-mode 3, where it seems to try to pickup newer snapshots/files and known common shared snapshots (not btrfs subvolumes here: cow snapshots) prior of rescanning old disk image files that have been rotated (renamed), where beesd then needs to rescan because the files were moved and therefore beesd needs to rescan, and see some changes.
- In qubesos context, there is a lot of warnings in beesd logs being FIXME: too many dedup candidates. Ideally, this should not be a problem @Zygo ? Is it a problem?
- to undo beesd looooong work (445gb of actual disk images states prior of dedup, resulting is approx 100gb of deduped consumed space on a 1.8Tb pool.
- When deploying qubesos, everything is under one single btrfs fs, which includes rootfs (dom0) and the reflink pool which is under /var/lib/qubes
- When setting up wyng, the tool requires to work on a btrfs subvolume. Therefore wyng instructs end user to shutdown all qubes, move /var/lib/qubes to /var/lib/qubes-old, create btrfs subvol under /var/lib/qubes and move back /var/lib/qubes-old/* content back under /var/lib/qubes/
- neither wyng/beesd/QubesOS is prescriptive about farther tuning btrfs filesystem outside of qubesos fs creation. Note that qubesos dom0 is based on fedora-37 and comes with btrfs-profs from that era, while no-holes, extended extends and tiny Metadata are turned on. Will provide details in subsequent comments.
- I experimented a bit with /etc/fstab a bit:
- Activating ssd mode
- with autodefag (seems bad and counter productive of dedup, then removed)
- activated zstd compression but not forced
- All of which as of now are not improving the situation when deduped cow volumes get rotated by qubesos current renaming scheme at vm poweron/poweroff
- maybe trimming gets in the way?
@tasket @Zygo : you have some guidelines on proper btrfs improvements of what is best known to work in cow disk images under virtualization context and more specific to qubesos use case of btrfs that should be tweaked? Willing to reinstall and restore backup if needed, where from current understanding most can/should be tweak able by balancing/fstab/tunefs without needing to reinstall.
Any insights welcome. I repeat, if I defrag: deduped is canceled and performances go back to normal. Thanks for your time.
