I agree with you that my server specs are a little bit excessive for my usual workload. I have disabled swap in the past with swapoff -a and removed the partition from /etc/fstab under a similar usage, and no issues were observed.
I am just leaving it there now for the rare instance when I run the occasional lightweight local LLM model (on CPU) for light tasks such as spell checking, which might need some RAM and I don't risk crashing due to OOM issues.
However, I still want to understand what is happening here to learn a little bit about my system. My intuition can be wrong here, but I find it strange that my laptop with similar specs and the same OS (but reasonably distinct workloads, to be fair) almost never swaps nor reaches those ridiculous levels of buffer + cache usage, so I think I might find one "offender" container to blame.
Well, here I have 41 containers and:
free -hm total used free shared buff/cache available Mem: 31Gi 5.7Gi 426Mi 207Mi 25Gi 25Gi Swap: 31Gi 3.7Gi 28GiAs well as
cat /proc/sys/vm/swappiness: 10and
$ cat /proc/pressure/cpu some avg10=0.00 avg60=0.00 avg300=0.00 total=302436406 full avg10=0.00 avg60=0.00 avg300=0.00 total=0 $ cat /proc/pressure/memory some avg10=0.00 avg60=0.00 avg300=0.00 total=64263542 full avg10=0.00 avg60=0.00 avg300=0.00 total=63043120 $ cat /proc/pressure/io some avg10=1.99 avg60=1.67 avg300=1.61 total=1844790000 full avg10=1.90 avg60=1.59 avg300=1.56 total=1788451770