I have been setting up Zram, Swap, Swappiness and EasyOOM daemon on 16gb ram boxes, or lower. Someone asked me about 32gb of ram, or more, and I'm unsure. Wondering if others have experimented with this!

you are viewing a single comment's thread
view the rest of the comments
[+] -6 points 4 months ago (6 children)

Why do you think 32GiB is special compared to 16GiB?
And wtf is EasyOOM?

You maximize the usefulness of zram by actually increasing sappiness, and giving zram devices high priority. e.g.

sysctl vm.swappiness=100

for i in {1..8}; do
  swapon /dev/zram${i} -p 32767
done

Then you enable other swap devices with lower priority.

This is the way regardless of how much RAM you have. I mean, it may be pointless if you never ever exceed, let's say 10/32GiB (including caching). But it still wouldn't be harmful in any way.

  • source
  • hideshow 6 child comments
  • [–] 6 points 4 months ago* (2 children)

    That isn't how swappiness works.

    Changing the sysctl for swappiness only adjusts the ratio of anonymous and file pages, it doesn't set a "threshold" or "aggressivity" in swapping pages, nor does it dictate how much or how little to swap.

    It's generally ill-advised to touch swappiness at all unless you know what you're doing. You can start here.

    If you're going to hand out free advice, at least make sure the advice is worth the price of admission.

  • source
  • parent
  • hideshow 2 child comments