I'm not a supernerd, but I know some stuff, and I'm pretty sure my system is not supposed to work like this.
I recently reinstalled Ubuntu 20.04 from the bones up on my home-built desktop because I noticed that my previous installation wasn't using my m.2 SSD drive, and that was probably why it took forever to boot up. After the reinstall, things went swimmingly for a short while, but then some instabilities started creeping up. She'd get increasingly sluggish to the point of freezing up if I left her on for any period of time, and occasionally she'd fail at logging into my domain account.
I started running bytop
to monitor her performance and see if anything was eating her RAM or something, and there were a few things that seemed to have a disproportionate impact like snap store
(I manually kill
it if it gets too demanding), and I switched from using Firefox as well to see if that managed a little better. I gave Brave a try, which was easy on resources, but it isn't supported for my accessibility extension and doesn't like talking to my uni's website. Chromium is a little better, but eh, whatever. Point is, none of that improved performance or mitigated the issue.
The problem as bytop
reports is a memory cache problem.
RAM is almost untouched, mem cache is exhausted
The swap space is completely available, the RAM is 91% available, and everything looks ducky except for the mem cache. I've seen various reports that this is "not a big deal," but I can say that it significantly negatively impacts performance. I regularly use sh -c 'sync; echo 3 > /proc/sys/vm/drop_caches'
to clear it out, and I do get some performance back for a minute as bytop
shows that all the cache is freed back up, but it refills rapidly and I can't seem to locate any app, process, or setting that would affect this at all.
To be clear, this 1% free problem happens before any programs are started. I have everything potentially in my startup applications turned off (lm-launch, Nextcloud, and SSH Key Agent). Just on the absolutely far-weird chance it was hardware related, my DH changed out my RAM yesterday for a more reputable brand, but that did not help.
I've found directions for adjusting or turning on/off swapiness, but the last reference I found to tweaking the mem cache was from Ubuntu 16.x, I think. Before I scrub her down and reinstall yet again, I thought I'd come to you fine folks and see if you had any thoughts. I'm not entirely sure what information would be useful, so ask away, and I will provide.
-- Deges