I’m seeing btrfs-cleaner completely freeze my system so all I can do is move the cursor around the screen. All the video and input freezes for 15s at a time, about twice per minute. Booting and logging in, are also very unresponsive.
I found three year old bugs at btrfsmaintenance and at bugzilla.opensuse.org and many reports of this elsewhere.
Three questions:
If only 1/8 of my hyperthreaded CPU cores are under any load, why does the UI (KDE) also freeze? Why aren’t these tasks split among cores? I have an NVMe drive and 32G RAM so the bottleneck seems to be on the CPU side.
Why aren’t BTRFS tasks run with lower priority? With the bug being ignored for years, is there a better way to request a change?
As a workaround, how can I lower the priority on all btrfs-maintenance tasks so it never freezes my PC? Solved. Thanks @ Tsu2 : https://forums.opensuse.org/showthread.php/535712-btrfs-transacti-and-btrf-cleaner?p=2908046#post2908046
jayarmstrong:
I’m seeing btrfs-cleaner completely freeze my system so all I can do is move the cursor around the screen. All the video and input freezes for 15s at a time, about twice per minute. Booting and logging in, are also very unresponsive.
I found three year old bugs at btrfsmaintenance and at bugzilla.opensuse.org and many reports of this elsewhere.
Three questions:
If only 1/8 of my hyperthreaded CPU cores are under any load, why does the UI (KDE) also freeze? Why aren’t these tasks split among cores? I have an NVMe drive and 32G RAM so the bottleneck seems to be on the CPU side.
Why aren’t BTRFS tasks run with lower priority? With the bug being ignored for years, is there a better way to request a change?
As a workaround, how can I lower the priority on all btrfs-maintenance tasks so it never freezes my PC? Solved. Thanks @ Tsu2 : https://forums.opensuse.org/showthread.php/535712-btrfs-transacti-and-btrf-cleaner?p=2908046#post2908046
Leap users may need to fix their routines: https://forums.opensuse.org/showthread.php/539905-How-to-fix-btrfsmaintenance On Tumbleweed they work out of the box: https://forums.opensuse.org/showthread.php/539905-How-to-fix-btrfsmaintenance?p=2987036#post2987036
tsu2
December 5, 2020, 2:20am
3
To answer your question about why processes may not be distributed across all your cores…
The simple answer which probably applies is that your one process that is placing the extreme load on your machine can run only on one core.
This can be the result of the one process simply being what it is, or it can be the result of poor coding that doesn’t spawn multiple processes to allow the workload to be done in parallel.
TSU
Right, but why would the btrfs-cleaner process block UI-related processes? Animations like htop or KSystemGuard freeze, I can’t switch tabs in Chrome, can’t retract Yakuake, etc. I would think all of that is running from RAM so it shouldn’t be blocked by disk I/O either.
@karlmistelberger
Thanks, those look like good improvements. My btrfsmaintenance script only runs weekly but the issue I’m seeing was caused by the timeline cleanup for / … at least, today.
jayarmstrong:
Right, but why would the btrfs-cleaner process block UI-related processes? Animations like htop or KSystemGuard freeze, I can’t switch tabs in Chrome, can’t retract Yakuake, etc. I would think all of that is running from RAM so it shouldn’t be blocked by disk I/O either.
@karlmistelberger
Thanks, those look like good improvements. My btrfsmaintenance script only runs weekly but the issue I’m seeing was caused by the timeline cleanup for / … at least, today.
I use btrfs on the Intel i3-4130, i7-6700K and the AMD 3400G and never experienced problems. You may show your hardware:
erlangen:~ # inxi -zFm
System: Kernel: 5.9.12-1-default x86_64 bits: 64 Console: tty 1 Distro: openSUSE Tumbleweed 20201205
Machine: Type: Desktop Mobo: ASRock model: Z170 Pro4S serial: <filter> UEFI: American Megatrends v: P3.50 date: 06/23/2016
Memory: RAM: total: 31.30 GiB used: 4.41 GiB (14.1%)
Array-1: capacity: 64 GiB slots: 4 EC: None
Device-1: ChannelA-DIMM0 size: No Module Installed
Device-2: ChannelA-DIMM1 size: 16 GiB speed: 2133 MT/s
Device-3: ChannelB-DIMM0 size: No Module Installed
Device-4: ChannelB-DIMM1 size: 16 GiB speed: 2133 MT/s
CPU: Topology: Quad Core model: Intel Core i7-6700K bits: 64 type: MT MCP L2 cache: 8192 KiB
Speed: 800 MHz min/max: 800/4200 MHz Core speeds (MHz): 1: 800 2: 800 3: 800 4: 800 5: 800 6: 800 7: 800 8: 800
Graphics: Device-1: AMD Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] driver: amdgpu v: kernel
Display: server: X.Org 1.20.9 driver: amdgpu,ati unloaded: fbdev,modesetting,vesa resolution: 3840x2160~60Hz
OpenGL: renderer: Radeon RX550/550 Series (POLARIS12 DRM 3.39.0 5.9.12-1-default LLVM 11.0.0) v: 4.6 Mesa 20.2.3
Audio: Device-1: Intel 100 Series/C230 Series Family HD Audio driver: snd_hda_intel
Device-2: AMD Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] driver: snd_hda_intel
Sound Server: ALSA v: k5.9.12-1-default
Network: Device-1: Intel Ethernet I219-V driver: e1000e
IF: enp0s31f6 state: up speed: 1000 Mbps duplex: full mac: <filter>
Drives: Local Storage: total: 6.38 TiB used: 1.51 TiB (23.7%)
ID-1: /dev/nvme0n1 vendor: Samsung model: SSD 950 PRO 512GB size: 476.94 GiB
ID-2: /dev/sda vendor: Western Digital model: WD40EZRX-22SPEB0 size: 3.64 TiB
ID-3: /dev/sdb vendor: Crucial model: CT2000BX500SSD1 size: 1.82 TiB
ID-4: /dev/sdc vendor: Samsung model: SSD 850 EVO 500GB size: 465.76 GiB
Partition: ID-1: / size: 51.69 GiB used: 23.70 GiB (45.8%) fs: btrfs dev: /dev/nvme0n1p2
ID-2: /home size: 406.34 GiB used: 280.47 GiB (69.0%) fs: ext4 dev: /dev/nvme0n1p3
ID-3: /opt size: 51.69 GiB used: 23.70 GiB (45.8%) fs: btrfs dev: /dev/nvme0n1p2
ID-4: /var size: 51.69 GiB used: 23.70 GiB (45.8%) fs: btrfs dev: /dev/nvme0n1p2
Swap: Alert: No Swap data was found.
Sensors: System Temperatures: cpu: 30.0 C mobo: 30.0 C gpu: amdgpu temp: 38 C
Fan Speeds (RPM): fan-1: 0 fan-2: 1216 fan-3: 0 fan-4: 0 fan-5: 0 fan-6: 0 gpu: amdgpu fan: 949
Info: Processes: 287 Uptime: 10h 25m Shell: bash inxi: 3.1.00
erlangen:~ #
There are some reports about btrfs-cleaner. Turning off quotas may help. Try ‘btrfs quota disable /’ or whatever your path is.