Before someone links me to linuxaremyram.com after reading the first line.
My buffer/cache usage is negligible. Continue reading.
Something on my desktop system is causing my memory usage to slowly climb until it becomes unusable.
Here's where things start to get odd though.
If you make a rough sum of the resident memory of userland applications, it comes to about 5-6GB (That is, unfortunately, normal, as firefox alone consumes 2-3GB.).
However, if I leave my system up for about 6-8 hours, something I do regularly as restarting is a pain for me, the memory usage goes from evening out at around 6GB to about 8-9GB. That's a 2-3GB discrepancy from the memory usage reported in userland. I would expect to see some disparity between these numbers, there's the kernel, and they're not entirely accurate, but that's not a negligible difference.
I can clear the kernel caches, it makes no difference. The available memory will continue to drop at an increasing rate until the system becomes unuable.
After 24 hours the discrepancy increases to 6-7GB and the system swapping starts to slow things down. The sum of userland memory remains at 5-6GB while the available memory has dropper to only a couple GB.
slabtop reports memory usage around 500MB, so it's not that.
My memory appears to just be consumed by some boundless abyss.
I don't even know where to look to diagnose this.
The commands I used are:
Code:
Sum of resident memory:
echo $(( $(top -b -o RES -n 1 | tail -n +8 | awk '{ print $6 }' | awk '{ s+=$1 } END { print s }') / 1024 ))MB
Used memory:
echo $(( $(free | head -n 2 | tail -n 1 | awk '{ print $3 }') / 1024 ))MB
Discrepancy is calculated as the difference between the two.
The caches where cleared using:
Code:
echo 3 > /proc/sys/vm/drop_caches
I'm running Fedora 30 with the latest updates, the issue started after a recent update.
I wonder if the issue is related to the kernel 5.3.7 update, but even if it is, the improvements in the newer kernel make it difficult for me to go back.
Where do I go with this. I'm losing my mind!
How can I diagnose memory usage that I can't see?