You are not logged in.

#1 2023-05-29 03:29:12

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 205

[SOLVED] Disabling Zswap not working

Hello, I'm using Arch Linux latest and I'm trying to enable zram by following Arch Wiki on https://wiki.archlinux.org/title/zram

During the installation I didn't set any swap partition.
Here, it is asked first to disable zswap that is enabled by default, and I followed what it is reported on https://wiki.archlinux.org/title/zswap#Toggling_zswap by editing "/etc/default/grub" file and add "zswap.enabled=0" to it in the following line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash loglevel=3 audit=0 nvme_load=yes zswap.enabled=0 nowatchdog"

Then, I run "sudo grub-mkconfig -o /boot/grub/grub.cfg". Then, reboot.

After reboot, if I run "zgrep CONFIG_ZSWAP_DEFAULT_ON /proc/config.gz", I still get:

CONFIG_ZSWAP_DEFAULT_ON=y

Why this variable is not set to "n"? How can I disable zswap?

Furthermore, on Internet I see different judges on the usage of zram or zswap. Someone says that zram is not convenient to use, and other posts say yes with respect to zswap. What do you think about it? Should I disable zswap and enable zram for getting improved performance?

Last edited by D3vil0p3r (2023-05-30 09:08:19)

Offline

#2 2023-05-29 03:37:09

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,464

Re: [SOLVED] Disabling Zswap not working

/proc/config.gz is the static kernel configuration, you want to check if /proc/cmdline carries the change you gave to grub instead.

...then cat /sys/module/zswap/parameters/enabled to confirm it has been disabled.

Can't help about the choice, I use zswap as default and I'm satisfied.

Last edited by kokoko3k (2023-05-29 03:40:21)


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#3 2023-05-29 06:09:30

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,244

Re: [SOLVED] Disabling Zswap not working

What do you think about it? Should I disable zswap and enable zram for getting improved performance?

You should get more RAM for getting improved performance.

There'sn askubuntu thread linked in the wiki which - on a glance - has a decent breakdown: https://askubuntu.com/questions/471912/ … -which-one
Specific access patterns may have different outcomes, see eg. https://bbs.archlinux.org/viewtopic.php … 2#p2063182 for a case where zswap is detrimental to the overall performance.

Offline

#4 2023-05-29 10:43:04

D3vil0p3r
Member
Registered: 2022-11-05
Posts: 205

Re: [SOLVED] Disabling Zswap not working

Thank you for the answer guys. According to the provided links, I try to use zram.

When I run "cat /proc/cmdline" I get:

BOOT_IMAGE=/@/boot/vmlinuz-linux-zen root=UUID=55da8d59-22cc-46a2-a9e9-950be1a4ed2a rw rootflags=subvol=@ quiet splash loglevel=3 audit=0 nvme_load=yes zswap.enabled=0 nowatchdog

and "cat /sys/module/zswap/parameters/enabled" returns "N". So I guess it is disabled.

Offline

Board footer

Powered by FluxBB