[SOLVED] Btfrs and baloo_file_extractor issue

After a recent update, my btfrs-cleaner utility and baloo_file_extractor began running constantly, using up to 50% of my ram and a lot of CPU, causing the desktop and any other applications to lock up. It also extended my boot-up and shut-down time to upwards of ten minutes and In researching this issue (there is very little about it on this forum) I came across this thread: https://forum.garudalinux.org/t/linux-5-16s-autodefrag-btrfs-regression/16961 that helped a little.

Here is what worked for me:

  1. Disable ALL btfrs utilities in the Garuda BTFRS Assistant
  2. Use balooctrl in terminal to suspend file indexing while I am using the computer.
    Code: # btfrsctrl suspend
  3. When I am finished I allow baloo to resume to continue indexing process (without it your files will not be searchable).
    Code: # balooctrl resume

As for btfrs, I can initiate the utilities whenever I feel the need to run them.

The issue appears to be rooted in the recent linux kernel, which allows certain processes to take as many resources as they need, while giving lower priority to other process, such as desktop and applications.

There is a git repo that may remedy this, which I am trying, to see if it does anything, but I have not yet tested it. See https://aur.archlinux.org/cfs-zen-tweaks.git

Not a linux expert, just a common user.

Just saying, but not knowing what baloo is I run a search: baloo_file_extractor at DuckDuckGo
Most results are about baloo wildly taking up CPU and RAM.
I'd try and see if there's something relevant before getting busy with the kernel.

2 Likes

Why don't you post your garuda-Inxi as requested in the template?

4 Likes
System:
  Kernel: 5.16.4-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=6cafe1ae-53e0-4003-8e56-0566259c4051
    rw [email protected] loglevel=3 quiet
  Desktop: KDE Plasma 5.23.5 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop System: ASUS product: All Series v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: H97M-E v: Rev X.0x serial: <superuser required> UEFI: American Megatrends
    v: 2702 date: 03/28/2016
CPU:
  Info: model: Intel Core i5-4690 bits: 64 type: MCP arch: Haswell family: 6 model-id: 0x3C (60)
    stepping: 3 microcode: 0x28
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
    L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 3492 min/max: 800/3900 scaling: driver: intel_cpufreq governor: performance
    cores: 1: 3492 2: 3492 3: 3492 4: 3492 bogomips: 27935
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: disabled, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics vendor: ASUSTeK
    driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:0412 class-ID: 0300
  Device-2: Logitech HD Webcam C615 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 3-3:2
    chip-ID: 046d:082c class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org 1.21.1.3 compositor: kwin_x11 driver: loaded: intel
    unloaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1600x900 s-dpi: 96 s-size: 422x237mm (16.6x9.3") s-diag: 484mm (19.1")
  Monitor-1: HDMI2 res: 1600x900 hz: 60 dpi: 58 size: 700x390mm (27.6x15.4") diag: 801mm (31.5")
  Message: Unable to show advanced data. Required tool glxinfo missing.
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c class-ID: 0403
  Device-2: Intel 9 Series Family HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel
    bus-ID: 00:1b.0 chip-ID: 8086:8ca0 class-ID: 0403
  Device-3: Logitech HD Webcam C615 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 3-3:2
    chip-ID: 046d:082c class-ID: 0e02 serial: <filter>
  Sound Server-1: ALSA v: k5.16.4-zen1-1-zen running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.44 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK AM1I-A
    driver: r8169 v: kernel port: e000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: down mac: <filter>
  Device-2: Ralink RT5572 Wireless Adapter type: USB driver: rt2800usb bus-ID: 3-10:5
    chip-ID: 148f:5572 class-ID: 0000 serial: <filter>
  IF: wlp0s20u10 state: up mac: <filter>
Drives:
  Local Storage: total: 4.55 TiB used: 1.81 TiB (39.7%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD5000AACS-00ZUB0 size: 465.76 GiB
    block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s type: N/A serial: <filter> rev: 1B01
    scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital model: WD40EFRX-68WT0N0 size: 3.64 TiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 0A82 scheme: GPT
  ID-3: /dev/sdc maj-min: 8:32 vendor: Western Digital model: WD5000LPVX-80V0TT0
    size: 465.76 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400
    serial: <filter> rev: 1A01 scheme: GPT
Partition:
  ID-1: / raw-size: 465.5 GiB size: 4.09 TiB (900.43%) used: 1.81 TiB (44.2%) fs: btrfs
    dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.45%) used: 546 KiB (0.2%) fs: vfat
    dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 465.5 GiB size: 4.09 TiB (900.43%) used: 1.81 TiB (44.2%) fs: btrfs
    dev: /dev/sda2 maj-min: 8:2
  ID-4: /var/log raw-size: 465.5 GiB size: 4.09 TiB (900.43%) used: 1.81 TiB (44.2%) fs: btrfs
    dev: /dev/sda2 maj-min: 8:2
  ID-5: /var/tmp raw-size: 465.5 GiB size: 4.09 TiB (900.43%) used: 1.81 TiB (44.2%) fs: btrfs
    dev: /dev/sda2 maj-min: 8:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.32 GiB used: 6.2 MiB (0.0%) priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 29.8 C mobo: 27.8 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 218 Uptime: 1h 16m wakeups: 0 Memory: 15.32 GiB used: 3.54 GiB (23.1%) Init: systemd
  v: 250 tool: systemctl Compilers: gcc: 11.1.0 clang: 13.0.0 Packages: pacman: 1753 lib: 409
  Client: Unknown Client: garuda-assistant inxi: 3.3.12

Baloo isn't the problem. It seems to be the btrfs utilities, btrfs-clean in particular, that constantly change and rearrange the file addresses during defrag and trim operations that causes baloo to run constantly to keep up with the indexing operations. At least that is what the information I have found indicates. After disabling the btrfs utilities in btfrs Assistant, Baloo ran for a bit then settled down.

I think it's worth trying an

update

in terminal.


OT: @filo
Sorrry :wink: I can't stop .

2 Likes

I update daily. Both in terminal and using Garuda Assistant. Can you elaborate a ilttle?

OK, I was misled by the kernel version in the inxi posted few minutes ago.
I was expecting 5.16.7.zen1-1.

1 Like

The inxi i posted was immediately after an update using GA just before I posted it. I'll try using terminal right now.

I just updated using terminal and it indicates "nothing to do." So I suppose that means 5.16.4.zen1-1-zen is the current kernel version.

So we have a problem here.
Please post your /etc/pacman.conf

2 Likes

Thats not garuda-inxi!

Garuda (2.5.4-2):
  System install date:     2021-07-17
  Last full system update: 2022-02-09
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       No/Undetected
  Snapshots:               Timeshift
  Failed units:            
2 Likes

Well, then, Houston, we have a problem. I used the GA to copy/paste that inxi to the forum.

/etc/pacman.conf:

# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
#HookDir     = /etc/pacman.d/hooks/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -L -C - -f -o %o %u
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
#CleanMethod = KeepInstalled
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
#Color
#NoProgressBar
CheckSpace
#VerbosePkgLists
#ParallelDownloads = 5

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

[multilib-testing]
Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

Sorry about the font. Don't know what happened.

You probably overwrote the pacman.conf after an available pacnew.
The Chaotic AUR for example is missing.

1 Like

That is probable. Last week I kept getting an error from Chaotic AUR. After going through the pacnew issues it stopped. So that's probably what I did. I'll get that fixed and try again. Thanks.

To include chaotic-aur in your pacman.conf add at the end

[chaotic-aur]
Include = /etc/pacman.d/chaotic-mirrorlist

Then execute again from terminal:

garuda-update
1 Like

Done. Did you see anything else?

In the pacman.conf?
Maybe just remove the comment here...

But I think the rest is OK.

Thanks. I'll post the new inxi, if you would do me the favor of reviewing it a second time. Thanks for your time.

edit: May be a minute. Seems to have hung on the snapshot backup.

There. This should look better. Thank you again for your help.

System:
  Kernel: 5.16.7-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 11.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=6cafe1ae-53e0-4003-8e56-0566259c4051
    rw [email protected] loglevel=3 quiet
  Desktop: KDE Plasma 5.24.0 tk: Qt 5.15.2 info: latte-dock wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop System: ASUS product: All Series v: N/A serial: <superuser required>
  Mobo: ASUSTeK model: H97M-E v: Rev X.0x serial: <superuser required> UEFI: American Megatrends
    v: 2702 date: 03/28/2016
CPU:
  Info: model: Intel Core i5-4690 bits: 64 type: MCP arch: Haswell family: 6 model-id: 0x3C (60)
    stepping: 3 microcode: 0x28
  Topology: cpus: 1x cores: 4 smt: <unsupported> cache: L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB
    L2: 1024 KiB desc: 4x256 KiB L3: 6 MiB desc: 1x6 MiB
  Speed (MHz): avg: 3468 high: 3493 min/max: 800/3900 scaling: driver: intel_cpufreq
    governor: performance cores: 1: 3493 2: 3492 3: 3493 4: 3396 bogomips: 27937
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT disabled
  Type: mds mitigation: Clear CPU buffers; SMT disabled
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2
    mitigation: Full generic retpoline, IBPB: conditional, IBRS_FW, STIBP: disabled, RSB filling
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics vendor: ASUSTeK
    driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:0412 class-ID: 0300
  Device-2: Logitech HD Webcam C615 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 3-3:2
    chip-ID: 046d:082c class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org 1.21.1.3 compositor: kwin_x11 driver: loaded: intel
    unloaded: modesetting alternate: fbdev,vesa display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1600x900 s-dpi: 96 s-size: 422x237mm (16.6x9.3") s-diag: 484mm (19.1")
  Monitor-1: HDMI2 res: 1600x900 hz: 60 dpi: 58 size: 700x390mm (27.6x15.4") diag: 801mm (31.5")
  OpenGL: renderer: Mesa DRI Intel HD Graphics 4600 (HSW GT2) v: 4.5 Mesa 21.3.5 compat-v: 3.0
    direct render: Yes
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio vendor: ASUSTeK
    driver: snd_hda_intel v: kernel bus-ID: 00:03.0 chip-ID: 8086:0c0c class-ID: 0403
  Device-2: Intel 9 Series Family HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel
    bus-ID: 00:1b.0 chip-ID: 8086:8ca0 class-ID: 0403
  Device-3: Logitech HD Webcam C615 type: USB driver: snd-usb-audio,uvcvideo bus-ID: 3-3:2
    chip-ID: 046d:082c class-ID: 0e02 serial: <filter>
  Sound Server-1: ALSA v: k5.16.7-zen1-1-zen running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.45 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK AM1I-A
    driver: r8169 v: kernel port: e000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: enp3s0 state: down mac: <filter>
  Device-2: Ralink RT5572 Wireless Adapter type: USB driver: rt2800usb bus-ID: 3-10:5
    chip-ID: 148f:5572 class-ID: 0000 serial: <filter>
  IF: wlp0s20u10 state: up mac: <filter>
Drives:
  Local Storage: total: 4.55 TiB used: 1.82 TiB (40.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Western Digital model: WD5000AACS-00ZUB0 size: 465.76 GiB
    block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s type: N/A serial: <filter> rev: 1B01
    scheme: GPT
  ID-2: /dev/sdb maj-min: 8:16 vendor: Western Digital model: WD40EFRX-68WT0N0 size: 3.64 TiB
    block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400 serial: <filter>
    rev: 0A82 scheme: GPT
  ID-3: /dev/sdc maj-min: 8:32 vendor: Western Digital model: WD5000LPVX-80V0TT0
    size: 465.76 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s type: HDD rpm: 5400
    serial: <filter> rev: 1A01 scheme: GPT
Partition:
  ID-1: / raw-size: 465.5 GiB size: 4.09 TiB (900.43%) used: 1.82 TiB (44.4%) fs: btrfs
    dev: /dev/sda2 maj-min: 8:2
  ID-2: /boot/efi raw-size: 260 MiB size: 256 MiB (98.45%) used: 546 KiB (0.2%) fs: vfat
    dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 465.5 GiB size: 4.09 TiB (900.43%) used: 1.82 TiB (44.4%) fs: btrfs
    dev: /dev/sda2 maj-min: 8:2
  ID-4: /var/log raw-size: 465.5 GiB size: 4.09 TiB (900.43%) used: 1.82 TiB (44.4%) fs: btrfs
    dev: /dev/sda2 maj-min: 8:2
  ID-5: /var/tmp raw-size: 465.5 GiB size: 4.09 TiB (900.43%) used: 1.82 TiB (44.4%) fs: btrfs
    dev: /dev/sda2 maj-min: 8:2
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 15.32 GiB used: 2 MiB (0.0%) priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 29.8 C mobo: 27.8 C
  Fan Speeds (RPM): N/A

That's better, let's see if the performance improves now...
To be precise, we now use

garuda-inxi

Which provide some more information. :blush:

4 Likes