Linux machine slowing down to a crawl

I am sorry for bad title but i have no idea where to start looking.

using Glances to monitor processes all i can see is ctx_sw spiking while the computer slows down to a halt, CPU and ram usage is under 50% and little no no swap is in use.

i am not sure if other things causes this to happen but i use the machine primarily to just run part of my web browsing needs as a side computer.

i don’t really know where to start looking. i know there is a week uptime but restarting the computer is not a permanent fix,
(i think it might work for a bit after restart but i am unsure for how long as i have not timed it)

i am fine with just burning it down and reinstalling the OS but it would be nice to find the source of this problem

My computer:
antergos
(taken form screenfetch)
OS: Arch Linux
Kernel: x86_64 Linux 4.16.2-2-ARCH
Uptime: 9d 22h 17m
Packages: 1090
Shell: bash 4.4.19
Resolution: 1920x1080
WM: i3
CPU: Intel Core i5-2310 @ 4x 3.2GHz
GPU: NVC8
RAM: 7961MiB

“ctx_sw: number of context switches (voluntary + involuntary) per second. A context switch is a procedure that a computer’s CPU (central processing unit) follows to change from one task (or process) to another while ensuring that the tasks do not conflict.”
Source: https://glances.readthedocs.io/en/stable/aoa/cpu.html

Firefox extensions:
Adnauseam
Dark Background and Light Text
DuckDuckGo Hide Unwanted Results
Facebook Container
Ghostery
HTTPS Everywhere
Privacy Badger
Tab Suspender
uMatrix
Vimium

Edit 2
i have tried disabling hardware acceleration which did nothing and am currently disabling all Firefox extensions to see if that does anything

Edit 3
looks like xorg is spiking in CPU usage at times, looks like it might be happening while switching to another virtual desktop

Edit 4
i am now seeing iowait also going up while doing stuff

Edit 5
Disabling all extensions did nothing

Context Switching is extremely CPU hungry. This happens when the CPU switches from working on Task A (be it a process or thread) to Task B. That’s probably where we’d want to start. What’s running on your system.

I’m assuming this is some sort of Fermi card. It looks like you don’t have your GPU drivers for xorg installed properly.

Make sure you’ve got xf86-video-nouveau installed.

1 Like

You could try installing the ck kernel. That might help.

is there an easy way to export all running processes/relevant ones?

(edit the GPU is a 550ti i think just some shit which came with the system)

if not the this is the top of “top” with a freshly opened firefox
3190 vagoo 20 0 1772976 177016 81452 S 5.6 2.2 0:01.37 Web Content
466 vagoo 20 0 200444 85812 5472 S 4.7 1.1 2:12.73 synergyc
21138 vagoo 20 0 586468 96100 4112 S 4.7 1.2 188:00.16 glances
448 root 20 0 500944 25788 15812 S 3.7 0.3 604:15.62 Xorg
28940 vagoo 20 0 441628 34112 6752 S 3.3 0.4 1:37.76 glances
802 vagoo 20 0 1111168 40212 15528 S 2.7 0.5 8:16.47 terminator
3275 vagoo 20 0 1673956 104928 74576 S 1.0 1.3 0:00.39 Web Content
720 vagoo 9 -11 1596360 21536 18532 S 0.7 0.3 183:02.67 pulseaudio
1637 vagoo 20 0 708460 1816 1140 S 0.7 0.0 89:57.71 conky
703 vagoo 20 0 146456 38080 35648 S 0.3 0.5 0:10.50 i3
3126 vagoo 20 0 2940956 624276 115780 S 0.3 7.7 0:05.59 firefox
13829 vagoo 20 0 1115348 28396 20264 S 0.3 0.3 252:10.88 pavucontrol
1 root 20 0 242340 4552 2928 S 0.0 0.1 5:03.88 systemd
2 root 20 0 0 0 0 S 0.0 0.0 0:00.57 kthreadd
4 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/0:0H
6 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 mm_percpu_wq
7 root 20 0 0 0 0 S 0.0 0.0 1:10.46 ksoftirqd/0
8 root -2 0 0 0 0 I 0.0 0.0 7:41.48 rcu_preempt
9 root -2 0 0 0 0 I 0.0 0.0 0:40.18 rcu_sched
10 root -2 0 0 0 0 I 0.0 0.0 0:00.00 rcu_bh
11 root -2 0 0 0 0 S 0.0 0.0 10:20.43 rcuc/0
12 root -2 0 0 0 0 S 0.0 0.0 0:00.00 rcub/0
13 root rt 0 0 0 0 S 0.0 0.0 0:00.09 migration/0
14 root rt 0 0 0 0 S 0.0 0.0 0:01.00 watchdog/0
15 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/0
16 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/1
17 root rt 0 0 0 0 S 0.0 0.0 0:00.98 watchdog/1
18 root rt 0 0 0 0 S 0.0 0.0 0:00.08 migration/1
19 root -2 0 0 0 0 S 0.0 0.0 10:49.46 rcuc/1
20 root 20 0 0 0 0 S 0.0 0.0 1:13.51 ksoftirqd/1
22 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/1:0H
23 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/2
24 root rt 0 0 0 0 S 0.0 0.0 0:01.01 watchdog/2
25 root rt 0 0 0 0 S 0.0 0.0 0:00.09 migration/2
26 root -2 0 0 0 0 S 0.0 0.0 10:53.95 rcuc/2
27 root 20 0 0 0 0 R 0.0 0.0 1:22.17 ksoftirqd/2
29 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/2:0H
30 root 20 0 0 0 0 S 0.0 0.0 0:00.00 cpuhp/3
31 root rt 0 0 0 0 S 0.0 0.0 0:00.98 watchdog/3
32 root rt 0 0 0 0 S 0.0 0.0 0:00.09 migration/3
33 root -2 0 0 0 0 S 0.0 0.0 10:56.67 rcuc/3
34 root 20 0 0 0 0 S 0.0 0.0 1:39.79 ksoftirqd/3
36 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 kworker/3:0H
37 root 20 0 0 0 0 S 0.0 0.0 0:00.00 kdevtmpfs
38 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 netns
39 root 20 0 0 0 0 S 0.0 0.0 0:00.00 rcu_tasks_kthre
42 root 20 0 0 0 0 S 0.0 0.0 0:00.35 khungtaskd
43 root 20 0 0 0 0 S 0.0 0.0 0:00.00 oom_reaper
44 root 0 -20 0 0 0 I 0.0 0.0 0:00.00 writeback
45 root 20 0 0 0 0 S 0.0 0.0 0:25.44 kcompactd0
46 root 25 5 0 0 0 S 0.0 0.0 0:00.00 ksmd
47 root 39 19 0 0 0 S 0.0 0.0 0:00.00 khugepaged

Well, you’ve got very few processes, so it’s almost guaranteed to be the GPU drivers for xorg.

2 Likes

ok, i have installed extra/xf86-video-nouveau 1.0.15-2 (xorg-drivers), it still shows up as GPU: NVC8 in screenfetch but i guess i’ll return if the issue comes back after some use.
Thanks for the help

Edit 1
I installed it and restarted the computer so it might take a couple of days before the issue comes back

what driver is the GPU showing under lspci -knn?

VGA compatible controller [0300]: NVIDIA Corporation GF110 [GeForce GTX 560 Ti 448 Cores] [10de:1087] (rev a1)
Subsystem: ZOTAC International (MCO) Ltd. GF110 [GeForce GTX 560 Ti 448 Cores] [19da:2207]
Kernel driver in use: nouveau
Kernel modules: nouveau

Okay, good. Looks like it’s picking up the nouveau driver properly.

I’ll be here if you continue to have issues.

1 Like

after 5 fays of uptime the issue has returned.

Uh oh. I was really hoping it was a GPU issue.

I’m not entirely sure where to go from here.

Without kicking the bees nest, maybe you should stick with a more stable distro as your daily?

1 Like

Telling an Arch (or derivative) user to switch distros is not just kicking the bees nest, you punted it across the field. :stuck_out_tongue:

4 Likes

If this was an important computer i would do that, but this one i just fuck around with and use to drive my need for many hundreds of browser tabs. Guess it is reinstallation time, Again thanks for everything

1 Like

Make no mistake, I like Arch. It’s fun, it’s interesting, you get to play with the latest and greatest and you get to tinker with it all you want. I tried it as my daily and went about a month before an update made it so crashy it became unusable. And I’m just not smart enough to figure out why it broke, and I don’t have the patience for my main computer not to work. :smiley:

2 Likes

If everything appears to be in working order hardware and software wise… The problem might simply be those “hundreds of open tabs” consuming enough CPU cycles over X amount of time considering that amount of tabs is going to build a sizable cache over time to cause just that sort of problem.

Not counting the potential for any hard-drive problems of course.

It might just be all of the tabs. i am not sure how firefox handles everything, does it have a leaking issue of some kind which might be causing it since it only happens after around 5 days of uptime?
with suspending all but currently in use tabs with https://add0n.com/tab-suspender.html how would that influence that?
i also block most stuff with uMatrix and other stuff as listed in OP

Smart says my hard drive looks fine, i know smart is not always accurate but throwing that out there.

Im not a Linux guru. Are you seeing a particular process consuming a good chunk of the system’s resources, i.e CPU, RAM, or Disk?
Also may be worth checking the size of you swap partition. If you are suspending “hundreds” of firefox tabs, it may be filling up your swap.

If it were my system, I would investate for a memory leak.

1 Like

You could check this by looking at your memory usage with glances or htop.

If your memory is full or your swap is filling up, that’s likely your issue.

If you want to share your SMART report, I can give you my opinion.

Wops, didn’t mean to take a complete screenshot.
Not sure if there is anything better to use than gnome-disks