Does anyone have a good configuration they could share for low-memory (~4GB) ARM devices, such as the Pinebook Pro or RPi4b? So far, I have this, which seems to be working, although it doesn’t seem to get used:
This might be the thing to look at first. I assume free is showing the ZRAM swap active? What happens to the values when you start to use more RAM, e.g. load Firefox and a number of tabs?
That looks fine. If you want to push it to use swap faster then you can tweak vm.swappiness, e.g. I run vm.swappiness=133 (because ZRAM is faster than disk swap). However, I don’t think it actually makes any difference in general use when it gets used - it provides extra capacity when it’s needed, and it’s probably pointless swapping out inactive pages out before then.
That seems to be a nice balance. My Pinebook Pro now uses swap a bit earlier than when it’s just about to run out of RAM. I was finding that the previous unwillingness to use swap was making it unstable.