On 4/12/23 06:08, Michael Kjörling wrote:
The reason for the system slowing down seems to me to likely be that once the system comes under memory pressure (quite possibly due to an increase in anonymous pages), it must evict something, and only non-anonymous (that is, backed) pages can be evicted safely. So most likely the allocator starts evicting program code, because that can be read back from storage later, or other forms of cache, in order to keep room for the anonymous pages which it cannot evict. The next time that code is needed, it must go all the way to the (horribly slow by comparison) storage, instead of originally just writing out to swap some anonymous pages which haven't been used in comparatively forever, like a tmpfs that someone mentioned, or data for inactive web browser tabs or documents you aren't doing anything active with.
It turns out I actually do have a modest swap though I don't recall enabling it. It doesn't seem to be used anway.
Given that, the system after 24 hours of typical use is nowhere near using up most of the memory.
I expect that the web browsers keep an eye on available memory and do most of their memory management/caching in a 'fixed' allocation as well as the memory marked buff/cache
Here is the status just now root@client:~# free -m total used free shared buff/cache available Mem: 32023 9654 14053 336 9261 22369 Swap: 976 8 968