Temporary system hangs/freezes when updating

hello alll.
I have 4 core intel N4200 cpu, 512GB ssd and 4GB of ram.

system is unresponsive when I am running updates.
Cursor moves but let's say the website ain't scrolling/ keyboard typing
Ram is not full.
I have tried muqss and bmq kernels, but not much difference.
It can be related to the disk activity.
which kernel can help.
I am not taxing it too much. For me 4GB of ram IS enough. was enough in Manjaro for years and with core 2 duo.
Please, any ideas guys?

1 Like

What is updating?

Any compilation will make your system unresponsive if you have configured it for single-application throughput rather than latency/responsiveness.

Performance modes tend to be designed to extract maximum performance for a single application (i.e. a game) rather than general multitasking.

3 Likes

Can confirm that's just a basic behavior. Whenever I run updates I just let it sit for a bit and stop doing my work.

Also, you've only got 4GB of ram and a celeron cpu, no wonder it takes so long. This distro can work with 4 GB, but I think 8 GB or more is recommended

4 Likes

pacman is updating the system.
making restore point, downloading updates, installing.

2 Likes

This possibly sounds related to the disk IO scheduler...

It's going to need some investigation, so some pointers:

  1. Try some different kernels (e.g. linux, linux-zen, linux-lts) and see if there's a difference;
  2. Install and run iotop and see what is spending a lot of time in disk IO;
  3. Run top and look for iowait and processes using the disk;
  4. Also check top for RAM usage.

There's probably not a "magic answer" to this (unless it's btrfs being weird).

5 Likes

And you have a browser running. Garuda requirements + an older system will do what yours is doing.

P.S. Love your avatar.

4 Likes

Updating doesn't require 4 GB RAM unless you have opened other RAM-intensive apps like web browser and even if you do, you should be fine. RAM isn't the problem, the CPU is. I have an old i3 and 4 GB RAM. During update when the grub is updated, CPU goes into overdrive which is to be expected. Just be patient, don't update the system every hour and during update don't do CPU intensive tasks and you should be fine.

Opening other GUI apps during a major update, like when Xorg or mesa or Plasma or Gnome is being updated, is asking for trouble.

1 Like

I have The same problem on updates and only there the sys hang . its after the update is complete .
and i have a fast sys so that should not be the reason .
i have it with multiple kernel zen ,tkg, xanmod calcule ,amdzenv2
as jonathon say i install iotop too look then i try install anbox too look on iotop
im sorry i dont no how i can copy only text on this behaver so i make screenshoot only of the impotant stuff


**inxi** -Fxxxza”
 ╰─λ inxi -Fxxxza
System:
  Kernel: 5.11.2-zen1-1-zen x86_64 bits: 64 compiler: gcc v: 10.2.1 
  parameters: BOOT_IMAGE=/@/boot/vmlinuz-linux-zen 
  root=UUID=05a427f0-e7bb-4fdd-96da-417540e16787 rw rootflags=subvol=@ quiet splash 
  rd.udev.log_priority=3 vt.global_cursor_default=0 systemd.unified_cgroup_hierarchy=1 
  loglevel=3 sysrq_always_enabled=1 mitigations=off 
  Desktop: KDE Plasma 5.21.2 tk: Qt 5.15.2 wm: kwin_x11 dm: SDDM Distro: Garuda Linux 
Machine:
  Type: Desktop System: ASUS product: N/A v: N/A serial: <filter> 
  Mobo: ASUSTeK model: ROG STRIX B550-F GAMING v: Rev X.0x serial: <filter> 
  UEFI: American Megatrends v: 1805 date: 02/05/2021 
Battery:
  Device-1: hidpp_battery_0 model: Logitech Wireless Keyboard K270 serial: <filter> 
  charge: 100% (should be ignored) rechargeable: yes status: Discharging 
CPU:
  Info: 12-Core model: AMD Ryzen 9 3900X bits: 64 type: MT MCP arch: Zen 2 
  family: 17 (23) model-id: 71 (113) stepping: N/A microcode: 8701021 L2 cache: 6 MiB 
  flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm 
  bogomips: 192008 
  Speed: 4000 MHz min/max: 2200/4000 MHz boost: enabled Core speeds (MHz): 1: 4000 
  2: 3997 3: 4010 4: 3980 5: 4007 6: 3997 7: 3998 8: 4003 9: 4000 10: 4041 11: 4035 
  12: 3979 13: 4004 14: 3999 15: 4016 16: 3968 17: 3999 18: 4029 19: 4031 20: 4001 
  21: 4026 22: 3983 23: 3987 24: 4030 
  Vulnerabilities: Type: itlb_multihit status: Not affected 
  Type: l1tf status: Not affected 
  Type: mds status: Not affected 
  Type: meltdown status: Not affected 
  Type: spec_store_bypass status: Vulnerable 
  Type: spectre_v1 status: Vulnerable: __user pointer sanitization and usercopy 
  barriers only; no swapgs barriers 
  Type: spectre_v2 status: Vulnerable, IBPB: disabled, STIBP: disabled 
  Type: srbds status: Not affected 
  Type: tsx_async_abort status: Not affected 
Graphics:
  Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT] vendor: ASUSTeK 
  driver: amdgpu v: kernel bus ID: 0a:00.0 chip ID: 1002:731f class ID: 0300 
  Display: x11 server: X.Org 1.20.10 compositor: kwin_x11 driver: loaded: amdgpu,ati 
  unloaded: modesetting,radeon alternate: fbdev,vesa display ID: :0 screens: 1 
  Screen-1: 0 s-res: 3840x2160 s-dpi: 96 s-size: 1016x571mm (40.0x22.5") 
  s-diag: 1165mm (45.9") 
  Monitor-1: DisplayPort-0 res: 3840x2160 hz: 60 dpi: 154 size: 632x360mm (24.9x14.2") 
  diag: 727mm (28.6") 
  OpenGL: 
  renderer: AMD Radeon RX 5700 XT (NAVI10 DRM 3.40.0 5.11.2-zen1-1-zen LLVM 11.1.0) 
  v: 4.6 Mesa 20.3.4 direct render: Yes 
Audio:
  Device-1: AMD Navi 10 HDMI Audio driver: snd_hda_intel v: kernel bus ID: 0a:00.1 
  chip ID: 1002:ab38 class ID: 0403 
  Device-2: AMD Starship/Matisse HD Audio vendor: ASUSTeK driver: snd_hda_intel 
  v: kernel bus ID: 0c:00.4 chip ID: 1022:1487 class ID: 0403 
  Device-3: Logitech HD Webcam C510 type: USB driver: snd-usb-audio,uvcvideo 
  bus ID: 1-9:6 chip ID: 046d:081d class ID: 0e02 serial: <filter> 
  Sound Server: ALSA v: k5.11.2-zen1-1-zen 
Network:
  Device-1: Intel Ethernet I225-V vendor: ASUSTeK driver: igc v: kernel port: N/A 
  bus ID: 07:00.0 chip ID: 8086:15f3 class ID: 0200 
  IF: enp7s0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
  IF-ID-1: wg-mullvad state: unknown speed: N/A duplex: N/A mac: N/A 
Bluetooth:
  Device-1: Cambridge Silicon Radio Bluetooth Dongle (HCI mode) type: USB 
  driver: btusb v: 0.8 bus ID: 3-1:2 chip ID: 0a12:0001 class ID: e001 
  Message: Required tool hciconfig not installed. Check --recommends 
Drives:
  Local Storage: total: 6.15 TiB used: 2.55 TiB (41.5%) 
  SMART Message: Unable to run smartctl. Root privileges required. 
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Corsair model: Corsair MP400 
  size: 1.82 TiB block size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 
  rotation: SSD serial: <filter> rev: ECFM53.0 temp: 40.9 C scheme: GPT 
  ID-2: /dev/nvme1n1 maj-min: 259:3 vendor: Samsung model: SSD 970 EVO Plus 1TB 
  size: 931.51 GiB block size: physical: 512 B logical: 512 B speed: 31.6 Gb/s 
  lanes: 4 rotation: SSD serial: <filter> rev: 2B2QEXM7 temp: 43.9 C scheme: GPT 
  ID-3: /dev/sda maj-min: 8:0 vendor: Crucial model: CT1000MX500SSD1 size: 931.51 GiB 
  block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s rotation: SSD 
  serial: <filter> rev: 020 scheme: GPT 
  ID-4: /dev/sdb maj-min: 8:16 vendor: Samsung model: SSD 860 QVO 2TB size: 1.82 TiB 
  block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s rotation: SSD 
  serial: <filter> rev: 2B6Q scheme: GPT 
  ID-5: /dev/sdc maj-min: 8:32 vendor: Samsung model: SSD 850 EVO 500GB 
  size: 465.76 GiB block size: physical: 512 B logical: 512 B speed: 6.0 Gb/s 
  rotation: SSD serial: <filter> rev: 2B6Q scheme: GPT 
  ID-6: /dev/sdd maj-min: 8:48 type: USB vendor: Samsung model: Type-C 
  size: 239.02 GiB block size: physical: 512 B logical: 512 B serial: <filter> 
  rev: 1100 scheme: MBR 
  SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Partition:
  ID-1: / raw size: 1.82 TiB size: 1.82 TiB (100.00%) used: 591.89 GiB (31.8%) 
  fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2 
  ID-2: /boot/efi raw size: 300 MiB size: 299.4 MiB (99.80%) used: 25.8 MiB (8.6%) 
  fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 
  ID-3: /home raw size: 1.82 TiB size: 1.82 TiB (100.00%) used: 591.89 GiB (31.8%) 
  fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2 
  ID-4: /var/log raw size: 1.82 TiB size: 1.82 TiB (100.00%) used: 591.89 GiB (31.8%) 
  fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2 
  ID-5: /var/tmp raw size: 1.82 TiB size: 1.82 TiB (100.00%) used: 591.89 GiB (31.8%) 
  fs: btrfs dev: /dev/nvme0n1p2 maj-min: 259:2 
Swap:
  Kernel: swappiness: 10 (default 60) cache pressure: 65 (default 100) 
  ID-1: swap-1 type: zram size: 2.62 GiB used: 456 KiB (0.0%) priority: 32767 
  dev: /dev/zram0 
  ID-2: swap-2 type: zram size: 2.62 GiB used: 512 KiB (0.0%) priority: 32767 
  dev: /dev/zram1 
  ID-3: swap-3 type: zram size: 2.62 GiB used: 512 KiB (0.0%) priority: 32767 
  dev: /dev/zram2 
  ID-4: swap-4 type: zram size: 2.62 GiB used: 448 KiB (0.0%) priority: 32767 
  dev: /dev/zram3 
  ID-5: swap-5 type: zram size: 2.62 GiB used: 256 KiB (0.0%) priority: 32767 
  dev: /dev/zram4 
  ID-6: swap-6 type: zram size: 2.62 GiB used: 260 KiB (0.0%) priority: 32767 
  dev: /dev/zram5 
  ID-7: swap-7 type: zram size: 2.62 GiB used: 260 KiB (0.0%) priority: 32767 
  dev: /dev/zram6 
  ID-8: swap-8 type: zram size: 2.62 GiB used: 260 KiB (0.0%) priority: 32767 
  dev: /dev/zram7 
  ID-9: swap-9 type: zram size: 2.62 GiB used: 256 KiB (0.0%) priority: 32767 
  dev: /dev/zram8 
  ID-10: swap-10 type: zram size: 2.62 GiB used: 256 KiB (0.0%) priority: 32767 
  dev: /dev/zram9 
  ID-11: swap-11 type: zram size: 2.62 GiB used: 324 KiB (0.0%) priority: 32767 
  dev: /dev/zram10 
  ID-12: swap-12 type: zram size: 2.62 GiB used: 240 KiB (0.0%) priority: 32767 
  dev: /dev/zram11 
  ID-13: swap-13 type: zram size: 2.62 GiB used: 68 KiB (0.0%) priority: 32767 
  dev: /dev/zram12 
  ID-14: swap-14 type: zram size: 2.62 GiB used: 372 KiB (0.0%) priority: 32767 
  dev: /dev/zram13 
  ID-15: swap-15 type: zram size: 2.62 GiB used: 504 KiB (0.0%) priority: 32767 
  dev: /dev/zram14 
  ID-16: swap-16 type: zram size: 2.62 GiB used: 512 KiB (0.0%) priority: 32767 
  dev: /dev/zram15 
  ID-17: swap-17 type: zram size: 2.62 GiB used: 512 KiB (0.0%) priority: 32767 
  dev: /dev/zram16 
  ID-18: swap-18 type: zram size: 2.62 GiB used: 512 KiB (0.0%) priority: 32767 
  dev: /dev/zram17 
  ID-19: swap-19 type: zram size: 2.62 GiB used: 512 KiB (0.0%) priority: 32767 
  dev: /dev/zram18 
  ID-20: swap-20 type: zram size: 2.62 GiB used: 252 KiB (0.0%) priority: 32767 
  dev: /dev/zram19 
  ID-21: swap-21 type: zram size: 2.62 GiB used: 256 KiB (0.0%) priority: 32767 
  dev: /dev/zram20 
  ID-22: swap-22 type: zram size: 2.62 GiB used: 256 KiB (0.0%) priority: 32767 
  dev: /dev/zram21 
  ID-23: swap-23 type: zram size: 2.62 GiB used: 256 KiB (0.0%) priority: 32767 
  dev: /dev/zram22 
  ID-24: swap-24 type: zram size: 2.62 GiB used: 140 KiB (0.0%) priority: 32767 
  dev: /dev/zram23 
Sensors:
  System Temperatures: cpu: 53.1 C mobo: N/A gpu: amdgpu temp: 55.0 C mem: 52.0 C 
  Fan Speeds (RPM): N/A gpu: amdgpu fan: 0 
Info:
  Processes: 545 Uptime: 3h 15m wakeups: 18 Memory: 62.78 GiB used: 11.59 GiB (18.5%) 
  Init: systemd v: 247 Compilers: gcc: 10.2.0 clang: 11.1.0 Packages: pacman: 2148 
  lib: 600 Shell: fish v: 3.1.2 running in: konsole inxi: 3.3.01 
Btrfs subvolumes
[🔴] × sudo btrfs subvol list /
[sudo] Passwort für smoky:  
ID 258 gen 40205 top level 5 path @root
ID 259 gen 27628 top level 5 path @srv
ID 260 gen 40154 top level 5 path @cache
ID 261 gen 40222 top level 5 path @log
ID 262 gen 40193 top level 5 path @tmp
ID 1522 gen 40222 top level 5 path @home
ID 1523 gen 40214 top level 5 path @
ID 1899 gen 39829 top level 5 path timeshift-btrfs/snapshots/2021-02-28_10-01-15/@
ID 1900 gen 27708 top level 5 path timeshift-btrfs/snapshots/2021-02-28_10-01-15/@home
ID 1981 gen 39825 top level 5 path timeshift-btrfs/snapshots/2021-03-03_16-11-54/@
ID 1982 gen 34835 top level 5 path timeshift-btrfs/snapshots/2021-03-03_16-11-54/@home
ID 1983 gen 39825 top level 5 path timeshift-btrfs/snapshots/2021-03-03_20-23-09/@
ID 1984 gen 39444 top level 5 path timeshift-btrfs/snapshots/2021-03-03_20-23-09/@home
ID 1985 gen 39825 top level 5 path timeshift-btrfs/snapshots/2021-03-03_22-31-27/@
ID 1986 gen 39715 top level 5 path timeshift-btrfs/snapshots/2021-03-03_22-31-27/@home
ID 1987 gen 39825 top level 5 path timeshift-btrfs/snapshots/2021-03-03_22-54-12/@
ID 1988 gen 39765 top level 5 path timeshift-btrfs/snapshots/2021-03-03_22-54-12/@home
ID 1989 gen 39825 top level 5 path timeshift-btrfs/snapshots/2021-03-04_07-04-00/@
ID 1990 gen 39827 top level 5 path timeshift-btrfs/snapshots/2021-03-04_07-04-00/@home
fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=8FFB-AA6A                            /boot/efi      vfat    umask=0077 0 2
UUID=05a427f0-e7bb-4fdd-96da-417540e16787 /              btrfs   subvol=@,defaults,noatime,space_cache,autodefrag,compress=zstd 0 1
UUID=05a427f0-e7bb-4fdd-96da-417540e16787 /home          btrfs   subvol=@home,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=05a427f0-e7bb-4fdd-96da-417540e16787 /root          btrfs   subvol=@root,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=05a427f0-e7bb-4fdd-96da-417540e16787 /srv           btrfs   subvol=@srv,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=05a427f0-e7bb-4fdd-96da-417540e16787 /var/cache     btrfs   subvol=@cache,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=05a427f0-e7bb-4fdd-96da-417540e16787 /var/log       btrfs   subvol=@log,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=05a427f0-e7bb-4fdd-96da-417540e16787 /var/tmp       btrfs   subvol=@tmp,defaults,noatime,space_cache,autodefrag,compress=zstd 0 2
UUID=817eafe1-0736-4cc5-ab30-d1d1a2ee6272 /mnt/817eafe1-0736-4cc5-ab30-d1d1a2ee6272 auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=SSD_Crucial 0 0
UUID=352441f8-4b27-455e-abb2-6922bd18a1e0 /mnt/352441f8-4b27-455e-abb2-6922bd18a1e0 auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Backup2t 0 0
UUID=98d3f2fd-3fa3-440c-b209-981481b170ba /mnt/98d3f2fd-3fa3-440c-b209-981481b170ba auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=Steamfast 0 0
UUID=2be6647a-ff9c-437f-a560-8079a4c8fd76 /mnt/2be6647a-ff9c-437f-a560-8079a4c8fd76 auto nosuid,nodev,nofail,x-gvfs-show,x-gvfs-name=drobbox 0 0
1 Like

BlockquoteIch habe einen alten i3 und 4 GB RAM. Während der Aktualisierung, wenn der Grub aktualisiert wird, geht die CPU in den zu erwartenden Overdrive.

This also happens with an i7 (8).

After major update, reboot the system. See if the problem persists.

1 Like

This only happens when the kernel is installed with Nvidia.
It doesn't pose a problem to me because it's only for a short time.

That’s showing several processes that don’t make much sense to have high IO, though the key one may well be btrfs-cleaner - if there’s background processing/maintenance going on it’s likely to impact on other processes too (e.g. a btrfs scrub or zpool scrub will do the same).

It also may be related to snapshot removal:

And, in common with the other threads on this topic, make sure to try disabling quotas:

btrfs quota disable /

See here also for more detail:

That sounds like it’s compiling the NVIDIA DKMS drivers, so some high CPU use at that point will be expected.

6 Likes

Entschuldigen Sie bitte. Ich meinte nicht, dass die CPU in der Overdrive geht, sondern auf 100% Auslastung läuft. das ist natürlich ein kleiner, aber feiner Unterschied.

Danke, ich schätze Ihre Antworten sehr!

आपका बहुत बहुत धन्यवाद।

This is looking like a btrfs bug/design choice:

https://www.spinics.net/lists/linux-btrfs/msg94705.html

Essentially, btrfs prioritises throughput rather than latency when it does operations on large snapshots, which on a desktop system will seem like it grinds to a halt.

Really it needs to go to a background thread (as with ZFS) to maintain interactivity (so the btrfs developers need to fix), but even with this momentary lag it's still worth having the option to restore a previous state.

7 Likes

Das hört sich so an, als würden die NVIDIA DKMS-Treiber kompiliert, sodass zu diesem Zeitpunkt eine hohe CPU-Auslastung zu erwarten ist.

Blockquote

Yes, I consider this behavior to be perfectly normal. And, as written above, it is not an overdrive, but only a 100% CPU utilization.

1 Like

Excuse me. Formatting has worked better before :woozy_face:

i try it now with btrfs quota disable / then no more freeze ..
But i activate it again bec having snapshot is more worth then the hang on updates .
Thx for explaining

BTW i look on snapshots .. i have 7 each with 487 GB (5 automatic 2 manual) . i thing its large thats why it makes trouble .. but i can live with it .. anything else runs fantastic

You don't need quota support for snapshots to work - you can leave quotas disabled if you're not using that feature.

2 Likes

A few days back, precisely at midnight, along with mandb and pkgfile, btrfs scrub started and then went berserk. Started consuming 100 % CPU. I simply reboot. Problem hasn't reoccurred. Yet. As you said, it might be a bug.

I don’t actually know if that’s true.
I disabled BTRFS quotas, rebooted, and ran an update.

In the snapshot process there was this message:

Using system disk as snapshot device for creating snapshots in BTRFS mode
Mounted ‘/dev/nvme0n1p1’ at ‘/run/timeshift/backup’
E: ERROR: can’t list qgroups: quotas not enabled
E: btrfs returned an error: 256
E: Failed to query subvolume quota
Enabled subvolume quota support

It then proceeded to actually make the snapshot.

It seems to have force enabled quota support in order to make the snapshot. I don’t know much about btrfs/timeshift snapshots, so I could be wrong

1 Like