vendredi 21 août 2015

Why are zram and swap hogging my RAM?



Lately my G4 has suddenly locked up several times, usually when unlocking. Everything would slow to a crawl (several minutes for anything to respond) or freeze entirely until I rebooted (which sometimes required pulling the battery).

I installed Cool Tool to diagnose the problem and found that it happens when free RAM gets under about 180MB. kswapd kicks in with several hundred MB/s of I/O (I saw it over 1000 once). I'm not sure what it's doing with that much I/O, but of course it makes everything grind to a screeching halt.

Looking in Kernel Adiutor (sic), ZRAM is set to 700MB and swappiness (who puts swap on a flash storage device anyway?) is 80. Both seem very high to me. Why using 700MB of precious RAM food for a virtual, compressed (slow!) swap file, and swap so often? I adjusted them to. 250MB and 20 respectively. As expected I now have way more free RAM (average ~600MB, up from ~300), things seem more responsive and I haven't had any lockup (but I only did this a few hours ago, so too early to know if it really fixed the problem).

Anyone know why these were set to such large numbers? Anyone else have this issue and if so, does this tweak help?



Aucun commentaire:

Enregistrer un commentaire