5 ms·
Once you swap a lot out and you get back some free memory linux will swap it back in on demand, which means a lot of micro-lag moments once apps start accessing
by xani_ 4y ago
Once you swap a lot out and you get back some free memory linux will swap it back in on demand, which means a lot of micro-lag moments once apps start accessing now-in-swap things.
Linux assumes it's better to have not-used thing in swap while RAM is used for IO caching, that's why you see this behaviour, there is (AFAIK) no mechanism to go "okay, we have few gigs free, let's bring stuff from swap back".
Reboot-less method is to add new LV with swap and swapoff the old one but that's more PITA than restart...