The problem I'm describing has followed me from Mint 18.3 to Devuan ASCII (~= Debian Stretch), so it is likely not super-specific to a distribution.
My typical desktop session has an IDE, two browsers (FF and Chromium), Libreoffice, a terminal application, and Thunderbird - on Cinnamon Fallback mode (it's in fallback mode because it doesn't like the fact that I don't use my discrete nVIDIA card for display but the onboard Intel graphics, yet I need the nVIDIA drivers loaded to do compute). Anyway, this ensemble works well enough, but at some point, trouble starts:
It always begins with Firefox becomes super-sluggish. I can barely switch to another app, and it can take me a minute or more to actually bring a terminal up to see what's going on. htop tells me it's at 100% CPU usage. This is already 2 problems: Why 100% even when it's not doing anything in particular? And why is the rest of the desktop not responding, even if FF wants to use up all of the CPU? Next, I kill it: killall -KILL firefox-esr. No, killing with SIGHUP doesn't work. At this point, I think theres a lot of thrashing to disk going on, but I can't verify that.
So, after it's dead, the CPU usage percentages go down, but all the apps behave as though they're climbing up a very steep slope and themselves become slow, or rather - there are delays for doing almost anything, and then that action continues at reasonable speed; until you hist some other delay, then you wait and so on. The incredible thing is, that can happen hours after the killing-of-firefox. And the sense is that somehow the system doesn't quite recover from the ordeal.
In some extreme cases, I can't manage to get the terminal window at all to do some killing, and the system effectively hangs, so I need to reboot (!) it, or log in remotely (!) to reset it.
My question: How the hell do I "unpack" this problem to try to address it or circumvent it?
Notes and additional information:
- My system is reasonably beefy: i5 7600K, 16 GB of memory. My root partition is on a Samsung 840 SSD.