Replacing zram with zswap #5111
NicolasDorier
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I was reading this blog post by a kernel developer which advise zwap. I will try on my laptop, but it seems to me a good idea.
So I have replaced it in my system.
I don't know if that's worth it or not, no complains so far, but it's not like I see obvious difference. So I will not make a PR, but just documenting things here in case somebody decide to tackle it.
The steps I've done:
Turn off zram
sudo systemctl mask systemd-zram-setup@zram0.service sudo rm /etc/systemd/zram-generator.conf sudo swapoff /dev/zram0 2>/dev/nullIncrease size of my swapfile
Sorry, but that steps depends about whether you have a swapfile configured by hybernation, so I won't document here.
The size is RAM + 50%. This is probably overkill, but whatever.
Enable zswap during runtime
Enable zswap when rebooting (Kernel)
In
/etc/limine-entry-tool.d/zswap.confKERNEL_CMDLINE[default]+=" zswap.enabled=1"Then
Troubleshot
You can see if it works with
sudo grep -r . /sys/kernel/debug/zswap/As page get swapped, counters go up!
All reactions