Temporary system hangs/freezes when updating

OK, it looks like there's a Timeshift setting for this:

Try leaving quotas enabled but disabling this option in the Timeshift settings:

image

(If it's still laggy then also try disabling this option and disabling quotas)

5 Likes

thanks all I will be waiting for a fix from the btrfs developers then

Did you try changing the above setting in Timeshift?

I did disable groups thingy. now waiting for new updates to see if it helps

1 Like

I can report my system also freezes when downloading stuff. No matter if chrome, firefox, pacman. What ever.
Kernel does not matter, I tried zen, tkg-bmq, tkg-pds, xanmod, lts.
All the same.

I only have 1 snapshot in timeshift.

Quotas are disabled on /.
BTRFS qgroups are disabled for timeshift.
(and yes I've had the same behavior with both enabled yada yada)

My system specifications are in my profile if you wanna know more.

And still if any process does some higher IO stuff my system comes to a grinding halt.
I have my iotop open on the second monitor every day now for 7 days and can observe when bigger write operations happen the btrfs-cleaner start a process with 99.99% IO>.

And I believe it is only write process which do that.
For example when I mount my backup drive and do an rsync of my home, no freezes at all.

╭─root at eha-desktop in ⌁
╰─# rsync -arlpP --exclude="eha/.local/share/Steam" --exclude="eha/.local/share/baloo" /home/eha /backup/

No freezes at all.
I even made a video to show this when downloading some bigger files.
First file with no problem but then... just imagine grinding wheels on a high speed train.
It was ~11 Minutes long and I speed it up by 300% since watching a system freeze is not that much fun, using such system even less..

I really like Garuda but this problem... it's a pain in the bum.
And yes I am a little salty while writing this. :salt:

1 Like

What options are your btrfs partitions mounted with?

1 Like

Default from the installer.

╭─eha@eha in ~
╰─λ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=d3c75445-c596-456b-b7f9-a7bc48e9126b /              btrfs   subvol=@,defaults,noatime,space_cache,autodefrag,compress=zstd 0 1
UUID=d3c75445-c596-456b-b7f9-a7bc48e9126b /home          btrfs   subvol=@home,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=d3c75445-c596-456b-b7f9-a7bc48e9126b /root          btrfs   subvol=@root,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=d3c75445-c596-456b-b7f9-a7bc48e9126b /srv           btrfs   subvol=@srv,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=d3c75445-c596-456b-b7f9-a7bc48e9126b /var/cache     btrfs   subvol=@cache,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=d3c75445-c596-456b-b7f9-a7bc48e9126b /var/log       btrfs   subvol=@log,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=d3c75445-c596-456b-b7f9-a7bc48e9126b /var/tmp       btrfs   subvol=@tmp,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=ed94801f-706d-4be0-a04c-8089203f46e1 swap           swap    defaults,noatime 0 0
1 Like

Could you also provide mount | grep btrfs ?

1 Like

Here you go.

╭─eha@eha in ~
╰─λ mount | grep btrfs
/dev/nvme0n1p1 on / type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=256,subvol=/@)
/dev/nvme0n1p1 on /home type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=257,subvol=/@home)
/dev/nvme0n1p1 on /root type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=258,subvol=/@root)
/dev/nvme0n1p1 on /srv type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=259,subvol=/@srv)
/dev/nvme0n1p1 on /var/cache type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=260,subvol=/@cache)
/dev/nvme0n1p1 on /var/log type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=261,subvol=/@log)
/dev/nvme0n1p1 on /var/tmp type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=262,subvol=/@tmp)

mount | grep btrfs
/dev/sda2 on / type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=256,subvol=/@)
/dev/sda2 on /srv type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=259,subvol=/@srv)
/dev/sda2 on /root type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=258,subvol=/@root)
/dev/sda2 on /home type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=257,subvol=/@home)
/dev/sda2 on /var/cache type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=260,subvol=/@cache)
/dev/sda2 on /var/log type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=261,subvol=/@log)
/dev/sda2 on /var/tmp type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=262,subvol=/@tmp)
/dev/sda2 on /run/timeshift/backup type btrfs (rw,relatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=5,subvol=/)

Your timeshift is empty.

YES because I tested if quota and qgroups disabled would help.
And yes I am aware of that, since I deleted them and only did one ‘snapshot’ with no qgroups and quota so timeshift cant know the size. (At least that is how I understood btrfs and qgroups and quota)

EDIT:
I forgot I also tried to disable baloo file indexer, also with no results.
Also tried disabling Compositor.

3 Likes

There is no difference here to my mount options and I don’t see the same thing (running linux-zen under a more vanilla Arch).

I can’t get btrfs_cleaner to trigger after running either a defrag or a balance, so something else is going on.

Could you have a read of @torvic9’s post here and see whether there’s anything obvious in terms of filesystem usage?

2 Likes
╭─eha@eha in ~ took 9s
[⚡] × sudo btrfs filesystem usage /
[sudo] password for eha:
Overall:
Device size:                 914.30GiB
Device allocated:            150.03GiB
Device unallocated:          764.27GiB
Device missing:                  0.00B
Used:                        147.81GiB
Free (estimated):            766.13GiB      (min: 766.13GiB)
Free (statfs, df):           766.13GiB
Data ratio:                       1.00
Metadata ratio:                   1.00
Global reserve:              288.83MiB      (used: 0.00B)
Multiple profiles:                  no

Data,single: Size:148.00GiB, Used:146.14GiB (98.74%)
/dev/nvme0n1p1        148.00GiB

Metadata,single: Size:2.00GiB, Used:1.67GiB (83.47%)
/dev/nvme0n1p1          2.00GiB

System,single: Size:32.00MiB, Used:16.00KiB (0.05%)
/dev/nvme0n1p1         32.00MiB

Unallocated:
/dev/nvme0n1p1        764.27GiB

No big delta for me.
I run btrfs balance start -musage=50 -dusage=50 / now and then since I thought this might help with my freezes.

1 Like

I was experiencing that for a day or two a few weeks back and then it went away. No idea what changes I did to resolve it because I'm constantly tweaking my system. I could have fixed it myself or it may have even simply resolved on an update.

Some of the things I played with were switching to the Zen kernel, I disabled the the Garuda performance-tweaks, disabled qgroups for btrfs, deleted all my timeshift snapshots, probably lots of other stuff that I don't quite remember. Think I might have written some udev rules and services as well. I'm always changing stuff and if I don't keep track of it all then my memory gets fuzzy, sorry I can't be more specific.

3 Likes

Next:

for i in /sys/block/*/queue/scheduler; do echo "$i: $(cat $i)"; done

(there's probably a better golf score for that, but hey)

1 Like
╭─eha@eha in ~ took 5s
╰─λ bash -c 'for i in /sys/block/*/queue/scheduler; do echo "$i: $(cat $i)"; done'
/sys/block/nvme0n1/queue/scheduler: [none] mq-deadline kyber bfq
/sys/block/nvme1n1/queue/scheduler: [none] mq-deadline kyber bfq
/sys/block/sda/queue/scheduler: mq-deadline kyber [bfq] none
/sys/block/sdb/queue/scheduler: mq-deadline kyber [bfq] none
/sys/block/zram0/queue/scheduler: none
/sys/block/zram10/queue/scheduler: none
/sys/block/zram11/queue/scheduler: none
/sys/block/zram12/queue/scheduler: none
/sys/block/zram13/queue/scheduler: none
/sys/block/zram14/queue/scheduler: none
/sys/block/zram15/queue/scheduler: none
/sys/block/zram1/queue/scheduler: none
/sys/block/zram2/queue/scheduler: none
/sys/block/zram3/queue/scheduler: none
/sys/block/zram4/queue/scheduler: none
/sys/block/zram5/queue/scheduler: none
/sys/block/zram6/queue/scheduler: none
/sys/block/zram7/queue/scheduler: none
/sys/block/zram8/queue/scheduler: none
/sys/block/zram9/queue/scheduler: none

Oh ya, I was also playing with disabling USB auto suspend as well. Too many changes to remember, as I say I'm constantly tweaking stuff.

2 Likes

BFQ can be temperamental sometimes, but an NVMe drive should work with none.

OK, so maybe it's time to try @tbg's approach and start disabling things and cleaning out... :confused:

:sob: But most of what @tbg described in his post and other topics I tried already.

Btw. how does one disable the garuda performance-tweaks?

I kinda want to try reinstalling Garuda and see if the same stuff happens again.
But this would be my last resort.

1 Like
garuda-settings

Settings / Tweaks un check

image