Comment on Help with understanding memory usage discrepancy

<- View Parent
eager_eagle@lemmy.world ⁨1⁩ ⁨day⁩ ago

yes, the system will likely use some swap if available even when there’s plenty of free RAM left:

The casual reader1 may think that with a sufficient amount of memory, swap is unnecessary but this brings us to the second reason. A significant number of the pages referenced by a process early in its life may only be used for initialisation and then never used again. It is better to swap out those pages and create more disk buffers than leave them resident and unused.

Src: www.kernel.org/doc/gorman/…/understand014.html

In my recently booted system with 32GB and half of that free (not even “available”), I can already see 10s of MB of swap used.

As rule of thumb, it’s only a concern or indication that the system is/was starved of memory if a significant share of swap is in use. But even then, it might just be some cached pages hanging around because the kernel decided to keep instead of evicting them.

source
Sort:hotnewtop