Btrfs heavy I/O performance issues

garuda-inxi
System:
  Kernel: 5.18.10-zen1-1-zen arch: x86_64 bits: 64 compiler: gcc v: 12.1.0
    parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen
    root=UUID=53e270ad-dfd5-4874-a125-69d21ada6b8d rw [email protected]
    rd.udev.log_priority=3 vt.global_cursor_default=0 loglevel=3
    sysrq_always_enabled=1 amdgpu.ppfeaturemask=0xffffffff nowatchdog
  Desktop: KDE Plasma v: 5.25.2 tk: Qt v: 5.15.5 info: latte-dock
    wm: kwin_wayland vt: 2 dm: SDDM Distro: Garuda Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: X470 Taichi serial: <superuser required>
    UEFI: American Megatrends v: P4.86 date: 01/27/2022
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Mouse MX Master 3
    serial: <filter> charge: 100% (should be ignored) rechargeable: yes
    status: discharging
CPU:
  Info: model: AMD Ryzen 5 2600X bits: 64 type: MT MCP arch: Zen+ gen: 2
    built: 2018-21 process: GF 12nm family: 0x17 (23) model-id: 8 stepping: 2
    microcode: 0x800820D
  Topology: cpus: 1x cores: 6 tpc: 2 threads: 12 smt: enabled cache:
    L1: 576 KiB desc: d-6x32 KiB; i-6x64 KiB L2: 3 MiB desc: 6x512 KiB
    L3: 16 MiB desc: 2x8 MiB
  Speed (MHz): avg: 4108 high: 4125 min/max: 2200/3600 boost: enabled
    scaling: driver: acpi-cpufreq governor: performance cores: 1: 4108 2: 4101
    3: 4121 4: 4077 5: 4112 6: 4085 7: 4113 8: 4125 9: 4125 10: 4101 11: 4111
    12: 4120 bogomips: 86401
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: mmio_stale_data status: Not affected
  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: Retpolines, IBPB: conditional, STIBP: disabled, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M]
    vendor: Gigabyte driver: amdgpu v: kernel arch: RDNA 2
    process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4 speed: 16 GT/s
    lanes: 16 ports: active: DP-1,HDMI-A-1 empty: DP-2,HDMI-A-2
    bus-ID: 0f:00.0 chip-ID: 1002:73df class-ID: 0300
  Display: wayland server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.2
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon alternate: fbdev,vesa gpu: amdgpu
    d-rect: 5888x2160 display-ID: 0
  Monitor-1: DP-1 pos: primary,left res: 2048x864 size: N/A modes: N/A
  Monitor-2: HDMI-A-1 pos: right res: 3840x2160 size: N/A modes: N/A
  OpenGL: renderer: AMD Radeon RX 6700 XT (navy_flounder LLVM 14.0.6 DRM
    3.46 5.18.10-zen1-1-zen)
    v: 4.6 Mesa 22.1.3 direct render: Yes
Audio:
  Device-1: AMD Navi 21/23 HDMI/DP Audio driver: snd_hda_intel v: kernel
    pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 0f:00.1 chip-ID: 1002:ab28
    class-ID: 0403
  Sound Server-1: ALSA v: k5.18.10-zen1-1-zen running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: PulseAudio v: 16.1 running: no
  Sound Server-4: PipeWire v: 0.3.54 running: yes
Network:
  Device-1: Intel I211 Gigabit Network vendor: ASRock driver: igb v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: d000 bus-ID: 09:00.0
    chip-ID: 8086:1539 class-ID: 0200
  IF: enp9s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Bluetooth:
  Device-1: Edimax Bluetooth Adapter type: USB driver: btusb v: 0.8
    bus-ID: 1-8:3 chip-ID: 7392:c611 class-ID: e001 serial: <filter>
  Report: bt-adapter ID: hci0 rfk-id: 0 state: up address: <filter>
Drives:
  Local Storage: total: 4.22 TiB used: 3.57 TiB (84.5%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Samsung
    model: SSD 970 EVO 250GB size: 232.89 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 2B2QEXE7 temp: 29.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:5 vendor: Samsung model: SSD 980 1TB
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B
    speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter> rev: 1B4QFXO7
    temp: 38.9 C scheme: GPT
  ID-3: /dev/sda maj-min: 8:0 vendor: Seagate model: ST2000DX002-2DV164
    size: 1.82 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: CC41 scheme: GPT
  ID-4: /dev/sdb maj-min: 8:16 type: USB vendor: Western Digital
    model: WD10EURX-63UY4Y0 size: 931.51 GiB block-size: physical: 4096 B
    logical: 512 B type: HDD rpm: 5400 serial: <filter> scheme: GPT
  ID-5: /dev/sdd maj-min: 8:48 type: USB vendor: Generic
    model: STORAGE DEVICE size: 366.82 GiB block-size: physical: 512 B
    logical: 512 B type: N/A serial: <filter> rev: 1532 scheme: MBR
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure?
Partition:
  ID-1: / raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 756.8 GiB (81.3%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:7
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 16.3 MiB (5.5%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:6
  ID-3: /home raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 756.8 GiB (81.3%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:7
  ID-4: /var/log raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 756.8 GiB (81.3%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:7
  ID-5: /var/tmp raw-size: 931.22 GiB size: 931.22 GiB (100.00%)
    used: 756.8 GiB (81.3%) fs: btrfs dev: /dev/nvme1n1p2 maj-min: 259:7
Swap:
  Kernel: swappiness: 133 (default 60) cache-pressure: 100 (default)
  ID-1: swap-1 type: zram size: 31.27 GiB used: 3.89 GiB (12.4%)
    priority: 100 dev: /dev/zram0
Sensors:
  System Temperatures: cpu: 51.6 C mobo: 38.0 C gpu: amdgpu temp: 57.0 C
    mem: 60.0 C
  Fan Speeds (RPM): cpu: 2054 fan-1: 0 fan-3: 0 fan-4: 0 fan-5: 0
    gpu: amdgpu fan: 0
  Power: 12v: N/A 5v: N/A 3.3v: 3.25 vbat: 3.28 gpu: amdgpu watts: 31.00
Info:
  Processes: 446 Uptime: 2h 10m wakeups: 3 Memory: 31.27 GiB
  used: 11.04 GiB (35.3%) Init: systemd v: 251 default: graphical
  tool: systemctl Compilers: gcc: 12.1.0 clang: 14.0.6 Packages: 2427
  pacman: 2409 lib: 590 flatpak: 18 Shell: fish v: 3.4.1 default: Bash
  v: 5.1.16 running-in: alacritty inxi: 3.3.19
Garuda (2.6.4-2):
  System install date:     2022-05-22
  Last full system update: 2022-07-10
  Is partially upgraded:   No
  Relevant software:       NetworkManager
  Windows dual boot:       Probably (Run as root to verify)
  Snapshots:               Snapper
  Failed units:

So ever since I started using garuda I have noticed performance issues whenever there is high I/O usage such as downloading a game copying a big file etc..
Is this a limitation of btrfs? I didn't notice the same performance issue when I briefly installed ubuntu on this same disk to troubleshoot some other issues I was having.

Check with htop if baloo (or similar) is in action.

Most of the time I have heavy use from Dolphin.

2 Likes

baloo is always the first thing i disable whenever I install kde. yeah its usually dolphin that has heavy usage from some copy operation. I didn't really pay attention to this until i switched to ubuntu for a bit and noticed way better system responsiveness. Which is why i was wondering if btrfs is inherently less responsive the ext4 or something

Something I did try just now is changing the cpu scheduler from performance to schedutil which seems to help with responsiveness a bit?

Is this happening when performing copy operations to an external USB drive?

Does this happen when performing a copy operation from the terminal as well?

I would test different kernels and I/O schedulers for improvements.

2 Likes

wow did not expect schedutil to make such a difference from performance. it seems to be spreading out the load more rather than just push one core.

I'm testing with multiple I/O operations one in the terminal merging some split files I needed to merge and another copying some files to a usb . while also syncing my docs to a cloud backup. cpu load is high as expected on most cores but the responsiveness is butter smooth.

maybe the schedutil cpu governor should be made the default if its not?

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.