I have a machine with Fedora Linux 42 installed, 16 core, 16GB of RAM and 8GB of SWAP on nvme.
The usual load on it is Firefox with 20~40 tabs, Slack and 1~4 VSCode windows, and a terminal with htop running
htop shows the cores being at ~10% load, RAM at ~10G and swap at ~5GB
Yet there are instances, most notably on Slack notifications, or opening a new VSCode windows, where everything slows down to a crawl, CPU cores are shown at >90%, both memory and swap are maxed out, which continue either until I can shut down one of the VSCode windows, when it ends up successfully opening, or just crashing the machine and forcing me to reboot.
I started to keep htop open at all time to try to identify what is wrong, but the slowing down makes trusting it unreliable, and the information gathered not that useful.
My current theories are either bad RAM that is somehow hit inconsistently, some process hogging RAM and not letting it go when it is reclaimed, or something linked to I/O.
How do I gather more information on what is polluting the RAM or hitting the I/O in a way that makes it blocked? Or are there system logs where I could find this kind of information?