Freezes with high disk activity

Hi All,

The last few days I have been doing quite a bit of file sorting, moving data around on my internal SSD which is also where EndeavourOS is installed. Often when I’m doing the file operation the desktop sessions completely hangs for sometimes up to a minute before I can even move the mouse or any other input is accepted.

I really havey no idea where to start looking for the issues so any advice would be greatly appreciated. What I do know is the same operations under Win10 do not cause freezing or slow down like what I’m seeing under Linux. Some machine specs below:

Kernel: 5.13.13-zen1-1-zen
CPU: Intel i7-3770 (8) @ 3.900GHz
GPU: NVIDIA GeForce GTX 1660 Ti
Memory: 4525MiB / 32060MiB
DE: GNOME 40.4
Disk format is BTRFS

Thanks

  1. Try LTS Kernel, zen is not particularly known to be super-stable.

  2. Are there any errors?

    journalctl -p3 -xb
    
  3. Do you use swap?

  4. What’s model of your disk?

    sudo inxi -D -az -y1
    
  5. Let’s see what disk scheduler is in use:

    cat /sys/class/block/sda/queue/scheduler
    
  6. Perhaps it’s some BTRFS problem, but i don’t think so…

2 Likes

Read in another post the that version of zen have some memory leak and doesn’t work well with ram/swap. You should wait using the lts until the new zen version will come out (is reported that the problem is sorted there)

1 Like

The refered-to Topic

Pudge

EDIT:
See last post

2 Likes

Thank you @Pudge. I wasn’t able to find the topic!

1 Like

Different versions of linux-zen. The version with the problem was 5.14.1-zen1 in [testing] (and fixed in 5.14.1.zen2), OP is using 5.13.13-zen1 in [extra].

Two key commands:

top
iotop

Check them both to see which processes are using the disk.

And so I misread the version.
@Ekstreme Really sorry for giving the wrong info. Please forgot what I said.

1 Like

Thanks for the reply all. I did some testing this afternoon and have some logs

Of note some ACPI errors but I don’t think the times line up. There were a few other errors but seems to be related to USB disks. Either way it’s a valuable exercise for me to go and find out what they all mean

I do not have a swap partition

The scheduler:
mq-deadline kyber [bfq] none

kernel: ACPI BIOS Error (bug): Could not resolve symbol [_SB.PCI0.SAT0.SPT1._GTF.DSSP], AE_NOT_FOUND (20210331/psargs-330)

kernel: ACPI Error: Aborting method _SB.PCI0.SAT0.SPT1._GTF due to previous error (AE_NOT_FOUND) (20210331/psparse-529)

The disk in question:
ID-5: /dev/sde
maj-min: 8:64
vendor: Samsung
model: SSD PM841 mSATA 256GB
size: 238.47 GiB
block-size:
physical: 512 B
logical: 512 B
sata: 3.1
speed: 3.0 Gb/s
rotation: SSD
serial:
rev: 4D0Q
scheme: GPT
SMART: yes
state: enabled
health: PASSED
cycles: 3920
read: 16.54 TiB
written: 61.45 TiB
Pre-Fail:
reallocated sector: 99
threshold: 10

and this is a snapshot of iotop while doing a copy operation. It’s a python scrip that is sorting files for me:
101885 be/4 root 0.00 B/s 0.00 B/s 0.00 % 99.99 % [kworker/u16:12+flush-btrfs-1]
101467 be/4 root 0.00 B/s 0.00 B/s 0.00 % 99.12 % [kworker/u16:4+events_unbound]
101395 be/4 root 0.00 B/s 326.19 K/s 0.00 % 53.93 % [kworker/u16:6+btrfs-delalloc]
101246 be/4 root 0.00 B/s 425.97 K/s 0.00 % 48.33 % [kworker/u16:1-btrfs-delalloc]
101799 be/4 root 0.00 B/s 168.85 K/s 0.00 % 26.95 % [kworker/u16:8+btrfs-worker]
101434 be/4 root 0.00 B/s 433.64 K/s 0.00 % 16.81 % [kworker/u16:3-btrfs-endio-write]
101833 be/4 root 0.00 B/s 268.63 K/s 0.00 % 5.92 % [kworker/u16:10-events_freezable_power_]
101861 be/4 root 0.00 B/s 176.53 K/s 0.00 % 4.27 % [kworker/u16:11-btrfs-endio-write]

Hopefully this gives some valuable insight. I will also try another kernel too. Thanks all

could it be an overheating m2.ssd?

Most likely it’s Kernel, although

Is not at all small amount, maybe it’s wearing out - i’d advise to backup any important data on the disk, if you have some, just in case.

Not sure of that model rated TBW, i’ve heard that even Samsung mSATA disks models have not the best controllers out there…

It’s possibly worth trying a balance so that BTRFS can adjust metadata and things.

sudo btrfs filesystem balance start -dusage=85 -musage=85 /path/to/mountpoint

(obviously, change /path/to/mountpoint to match where the disk is mounted)

Also,

does not look healthy (as keybreak suggests).

Thanks for your help all. I’m going to rep[lace the disk and see what happens. I’ll report back once I’ve manged to clone it and re-rest.

1 Like