Btfrs-transaction issue

Hello :slight_smile:

I am very happy with Garuda Linux, but, I have one Issue with BTFRS. If the task BTFRS-transaction starts, the PC freeze. It is installed on a SATA SSD and I have set Balance, Scrub and Defrag to, weekly, weekly, monthly.

Garuda-inxi:

  Kernel: 6.8.7-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc avail: hpet,acpi_pm
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=9bdc1bb8-710e-4a2b-a1fc-d771d79d9fb1 rw rootflags=subvol=@
    quiet resume=UUID=3de67b4e-0081-4321-8b87-d6348302d4da loglevel=3 ibt=off
  Desktop: Cinnamon v: 6.0.4 tk: GTK v: 3.24.41 wm: Muffin v: 6.0.1 tools:
    avail: cinnamon-screensaver,xautolock dm: LightDM v: 1.32.0 Distro: Garuda
    base: Arch Linux
Machine:
  Type: Desktop Mobo: ASUSTeK model: CROSSHAIR VI HERO v: Rev 1.xx
    serial: <filter> part-nu: SKU UEFI: American Megatrends v: 7704
    date: 12/16/2019
CPU:
  Info: model: AMD Ryzen 9 3900X socket: AM4 bits: 64 type: MT MCP arch: Zen 2
    gen: 3 level: v3 note: check built: 2020-22 process: TSMC n7 (7nm)
    family: 0x17 (23) model-id: 0x71 (113) stepping: 0 microcode: 0x8701013
  Topology: cpus: 1x cores: 12 tpc: 2 threads: 24 smt: enabled cache:
    L1: 768 KiB desc: d-12x32 KiB; i-12x32 KiB L2: 6 MiB desc: 12x512 KiB
    L3: 64 MiB desc: 4x16 MiB
  Speed (MHz): avg: 2333 high: 3800 min/max: 2200/4672 boost: enabled
    base/boost: 3800/4650 scaling: driver: acpi-cpufreq governor: schedutil
    volts: 1.1 V ext-clock: 100 MHz cores: 1: 2200 2: 2200 3: 2200 4: 2200
    5: 2200 6: 2200 7: 2200 8: 2200 9: 2200 10: 2200 11: 2200 12: 2200
    13: 2200 14: 3800 15: 2200 16: 2200 17: 3800 18: 2200 19: 2200 20: 2200
    21: 2200 22: 2200 23: 2200 24: 2200 bogomips: 182408
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities: <filter>
Graphics:
  Device-1: NVIDIA GP104 [GeForce GTX 1070] vendor: ASUSTeK driver: nvidia
    v: 550.76 alternate: nouveau,nvidia_drm non-free: 545.xx+ status: current
    (as of 2024-04; EOL~2026-12-xx) arch: Pascal code: GP10x
    process: TSMC 16nm built: 2016-2021 pcie: gen: 3 speed: 8 GT/s lanes: 16
    ports: active: none off: DVI-D-1,HDMI-A-1,HDMI-A-2 empty: DP-1,DP-2
    bus-ID: 0b:00.0 chip-ID: 10de:1b81 class-ID: 0300
  Display: server: X.Org v: 21.1.13 with: Xwayland v: 23.2.6 driver: X:
    loaded: nvidia gpu: nvidia,nvidia-nvswitch display-ID: :0 screens: 1
  Screen-1: 0 s-res: 5760x1080 s-dpi: 92 s-size: 1590x301mm (62.60x11.85")
    s-diag: 1618mm (63.71")
  Monitor-1: DVI-D-1 mapped: DVI-D-0 note: disabled pos: primary,center
    model: BenQ GL2450H serial: <filter> built: 2015 res: 1920x1080 hz: 60
    dpi: 92 gamma: 1.2 size: 531x298mm (20.91x11.73") diag: 609mm (24")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  Monitor-2: HDMI-A-1 mapped: HDMI-0 note: disabled pos: right
    model: Dell SE2422H serial: <filter> built: 2022 res: 1920x1080 hz: 60
    dpi: 93 gamma: 1.2 size: 527x296mm (20.75x11.65") diag: 604mm (23.8")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  Monitor-3: HDMI-A-2 mapped: HDMI-1 note: disabled pos: left
    model: Dell SE2422H serial: <filter> built: 2022 res: 1920x1080 hz: 60
    dpi: 93 gamma: 1.2 size: 527x296mm (20.75x11.65") diag: 604mm (23.8")
    ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: EGL v: 1.5 hw: drv: nvidia platforms: device: 0 drv: nvidia device: 2
    drv: swrast gbm: drv: nvidia surfaceless: drv: nvidia x11: drv: nvidia
    inactive: wayland,device-1
  API: OpenGL v: 4.6.0 compat-v: 4.5 vendor: nvidia mesa v: 550.76
    glx-v: 1.4 direct-render: yes renderer: NVIDIA GeForce GTX 1070/PCIe/SSE2
    memory: 7.81 GiB
  API: Vulkan v: 1.3.279 layers: 4 device: 0 type: discrete-gpu
    name: NVIDIA GeForce GTX 1070 driver: nvidia v: 550.76 device-ID: 10de:1b81
    surfaces: xcb,xlib
Audio:
  Device-1: NVIDIA GP104 High Definition Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16
    bus-ID: 0b:00.1 chip-ID: 10de:10f0 class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16
    bus-ID: 0d:00.4 chip-ID: 1022:1487 class-ID: 0403
  API: ALSA v: k6.8.7-zen1-1-zen status: kernel-api with: aoss
    type: oss-emulator tools: N/A
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: PipeWire v: 1.0.5 status: n/a (root, process) with:
    1: pipewire-pulse status: active 2: wireplumber status: active
    3: pipewire-alsa type: plugin 4: pw-jack type: plugin
    tools: pactl,pw-cat,pw-cli,wpctl
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASUSTeK driver: igb v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: e000 bus-ID: 05:00.0
    chip-ID: 8086:1539 class-ID: 0200
  IF: enp5s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IF-ID-1: virbr0 state: down mac: <filter>
  Info: services: NetworkManager,systemd-timesyncd
Drives:
  Local Storage: total: 7.28 TiB used: 723.63 GiB (9.7%)
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung model: SSD 980 PRO with
    Heatsink 1TB size: 931.51 GiB block-size: physical: 512 B logical: 512 B
    speed: 63.2 Gb/s lanes: 4 tech: SSD serial: <filter> fw-rev: 4B2QGXA7
    temp: 37.9 C scheme: GPT
  SMART: yes health: PASSED on: 19d 1h cycles: 435
    read-units: 31,299,635 [16.0 TB] written-units: 26,712,026 [13.6 TB]
  ID-2: /dev/sda maj-min: 8:0 vendor: Samsung model: SSD 870 QVO 1TB
    family: based SSDs size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B sata: 3.3 speed: 6.0 Gb/s tech: SSD serial: <filter>
    fw-rev: 2B6Q temp: 33 C scheme: GPT
  SMART: yes state: enabled health: PASSED on: 235d 18h cycles: 809
    written: 14.95 TiB
  ID-3: /dev/sdb maj-min: 8:16 vendor: Hitachi model: HUA723020ALA641
    family: Ultrastar 7K3000 size: 1.82 TiB block-size: physical: 512 B
    logical: 512 B sata: 2.6 speed: 6.0 Gb/s tech: HDD rpm: 7200
    serial: <filter> fw-rev: A840 temp: 37 C scheme: GPT
  SMART: yes state: enabled health: PASSED on: 1y 96d 18h cycles: 1647
  ID-4: /dev/sdc maj-min: 8:32 vendor: Western Digital
    model: WD10EFRX-68PJCN0 family: Red size: 931.51 GiB block-size:
    physical: 4096 B logical: 512 B sata: 3.0 speed: 6.0 Gb/s tech: HDD
    rpm: 5400 serial: <filter> fw-rev: 0A82 temp: 32 C scheme: MBR
  SMART: yes state: enabled health: PASSED on: 2y 28d 17h cycles: 2865
    Old-Age: UDMA CRC errors: 38136 alert: Bad cable/connection?
  ID-5: /dev/sdd maj-min: 8:48 vendor: Western Digital
    model: WD10EADS-00M2B0 family: Caviar Green size: 931.51 GiB block-size:
    physical: 512 B logical: 512 B sata: 2.6 speed: 3.0 Gb/s tech: N/A
    serial: <filter> fw-rev: 0A01 temp: 35 C scheme: MBR
  SMART: yes state: enabled health: PASSED on: 2y 286d 3h cycles: 4276
  ID-6: /dev/sde maj-min: 8:64 vendor: Samsung model: SSD 860 EVO 1TB
    family: based SSDs size: 931.51 GiB block-size: physical: 512 B
    logical: 512 B sata: 3.1 speed: 6.0 Gb/s tech: SSD serial: <filter>
    fw-rev: 1B6Q temp: 31 C scheme: GPT
  SMART: yes state: enabled health: PASSED on: 1y 307d 18h cycles: 2294
    written: 63.47 TiB
  ID-7: /dev/sdf maj-min: 8:80 vendor: SanDisk model: SSD PLUS 1000GB
    family: Marvell based SSDs size: 931.52 GiB block-size: physical: 512 B
    logical: 512 B sata: 3.2 speed: 6.0 Gb/s tech: SSD serial: <filter>
    fw-rev: 00RL temp: 35 C scheme: MBR
  SMART: yes state: enabled health: PASSED on: 218d 9h cycles: 792
Partition:
  ID-1: / raw-size: 896.82 GiB size: 896.82 GiB (100.00%)
    used: 723.63 GiB (80.7%) fs: btrfs block-size: 4096 B dev: /dev/sda2
    maj-min: 8:2
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 584 KiB (0.2%) fs: vfat block-size: 512 B dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 896.82 GiB size: 896.82 GiB (100.00%)
    used: 723.63 GiB (80.7%) fs: btrfs block-size: 4096 B dev: /dev/sda2
    maj-min: 8:2
  ID-4: /var/log raw-size: 896.82 GiB size: 896.82 GiB (100.00%)
    used: 723.63 GiB (80.7%) fs: btrfs block-size: 4096 B dev: /dev/sda2
    maj-min: 8:2
  ID-5: /var/tmp raw-size: 896.82 GiB size: 896.82 GiB (100.00%)
    used: 723.63 GiB (80.7%) fs: btrfs block-size: 4096 B dev: /dev/sda2
    maj-min: 8:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default) zswap: no
  ID-1: swap-1 type: zram size: 31.26 GiB used: 8.61 GiB (27.6%)
    priority: 100 comp: zstd avail: lzo,lzo-rle,lz4,lz4hc,842 max-streams: 24
    dev: /dev/zram0
  ID-2: swap-2 type: partition size: 34.39 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/sda3 maj-min: 8:3
Sensors:
  System Temperatures: cpu: 55.0 C mobo: 29.0 C gpu: nvidia temp: 55 C
  Fan Speeds (rpm): cpu: 1394 case-1: 0 case-2: 1169 case-3: 0 gpu: nvidia
    fan: 0%
  Power: 12v: 12.29 5v: N/A 3.3v: N/A vbat: 3.16
Info:
  Memory: total: 32 GiB available: 31.27 GiB used: 13.75 GiB (44.0%)
  Processes: 614 Power: uptime: 12h 10m states: freeze,mem,disk
    suspend: deep avail: s2idle wakeups: 0 hibernate: platform avail: shutdown,
    reboot, suspend, test_resume image: 12.46 GiB services: csd-power,upowerd
    Init: systemd v: 255 default: graphical tool: systemctl
  Packages: pm: pacman pkgs: 2073 libs: 615 tools: paru,yay Compilers:
    clang: 17.0.6 gcc: 13.2.1 Shell: garuda-inxi (sudo) default: Bash v: 5.2.26
    running-in: gnome-terminal inxi: 3.3.34
Garuda (2.6.26-1):
  System install date:     2024-01-20
  Last full system update: 2024-04-23
  Is partially upgraded:   No
  Relevant software:       snapper NetworkManager dracut nvidia-dkms
  Windows dual boot:       Yes
  Failed units:            vmware.service 
 

How can I configure BTFRS, that the Transaction is only weekly or something like that. Or better, it doesn’t freeze at all. Today, after the BTFRS transaction after start (Is 20–30 minutes) Where I can’t use the PC, I have it three times after that, that BTFRS-Transaction freeze my PC. I can see it on the Info at my Cinnemon environment. It could be BTFRS-Cleaner with the freeze, too.

Is that anything I could do?

Thanks for the Answer.

Test the LTS kernel to see if the issue persists.

sudo pacman -S linux-lts linux-lts-headers

Choose the LTS kernel from the advanced boot options in the Grub menu at startup, before you log in.

4 Likes

The first test was good. BTFRS-Transaction was only 2-4 minutes and no freeze. So I test it the next couple days.

Thank you for now.

Btfrs-Transaction come today after 7h. And it freezes the PC again. Especially Streams. Other things feel like random if the freeze come or not. But it was only 3-4 minutes.

What can I check now too?

Yeah I can confirm 4 times today. But only 2-3 Minutes. Twitch stream lags. The reload of this forum lags. Youtube not lag.

It is possible that it collides with snapper.
Do you have timeline snapshots enabled? If so, try disabling that.

Check dmesg for btrfs entries after a freeze.

And fix this:

1 Like
[   50.234345] BTRFS info: devid 1 device path /dev/sda2 changed to /dev/disk/by-uuid/9bdc1bb8-710e-4a2b-a1fc-d771d79d9fb1 scanned by Thread (pooled) (4428)
[  605.181111] BTRFS info: devid 1 device path /dev/disk/by-uuid/9bdc1bb8-710e-4a2b-a1fc-d771d79d9fb1 changed to /dev/sda2 scanned by mount (11626)

That was after the freeze. And yes I have Snapper enabled. But the last snap is from 16:00 The freeze was at 16:45 around.

Thank you for your post to my old HDD. I will check this.

Is the BTRFS entrie that what you expect? I Reduce the Snap to 1 Daily. That could be than fix the Problem. Snapshots are useful in case of failure too. What is with the systemd Unit Settings. Snapper timeline enabled, Snapper cleanup enabled, Snapper boot enabled. This also disabling?

Nope, that’s not an error, timeout or anything like that.

The snapper thing is just a suspicion.
Try setting everything to the default values ​​in the Garuda BTRFS Assistant and see if that helps:

Subvolumes:
Include Timeshift and Snapper Snapshots → disabled

Snapper Settings:
Enable timeline snapshots → disabled
systemd unit Settings → only enable “Snapper cleanup enabled”

BTRFS maintenance:
Balance/Scrub/Defrag → weekly + all 3 mountpoints activated (Select All)

1 Like

Ok I try this. BTRFS was on weekly the whole time. I disable timeline snapshots.

Then we will see :smiley: Thanks for your assistance.

1 Like

Ok. I think, it is the Snapper.

14h no lag. Then I have make manual Snapshot with snapper. After. 10-20 min, the btrfs-transaction and btrfs-cleaner work and it freeze.

Can I set other Settings for Snapshots?

Do you have btrfs quotas enabled? If so, try disabling that.

What happens during freeze, high CPU usage or heavy disk i/o?

2 Likes

I have disabled the btrfs quota. I tested the function with 2 snapshots. No Lag. So, that could be the Problem I think. I have read in the archlinux wiki this

Warning: Qgroup is not stable yet and combining quota with (too many) snapshots of subvolumes can cause performance problems, for example when deleting snapshots. Plus there are several more known issues.

So I tested to delete one Snapshot with disabled Quota. No Problem. So, I could test next, to have less snapshots. At the Moment I have 29.

And disk i/o and CPU usage is not very much.


Please do not post here in the forum, like in chat forums like Telegram.

As long as no one has responded to your post, you can edit your post.

With the BTFRS Quota disabled on the LTS Kernel I have no problems. But I cannot boot in the zen kernal anymore. It “freeze” in the boot screen. LTS Kernel runs without Problems.

You should open a new topic for this.

But first take a look here:

2 Likes