Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: zswap can't use lz4 compression algorithm and z3fold pool anymore

  1. #1

    Unhappy zswap can't use lz4 compression algorithm and z3fold pool anymore

    Good afternoon! I've got a little problem on my side.


    Recently, Linux kernel stopped using lz4 and z3fold as it's being configured. Instead, in dmesg I get:
    [ 1.242353] zswap: compressor lz4 not available, using default lzo
    [ 1.244351] zswap: zpool z3fold not available, using default zbud
    [ 1.244358] zswap: loaded using pool lzo/zbud
    Of course, I have taken measures to lz4/z3fold modules at boot. For example, in /etc/modules-load.d/ I placed lz4.conf and z3fold.conf with appropriate content abd I even messed with dracut and put the same-type configuration files in /etc/dracut.conf.d/, but nothing works.
    But it was working only recently, I swear! I don't know, however, when it happened (after 5.6 to 5.7 kernel upgrade?).


    What /proc/cmdline says:
    BOOT_IMAGE=/boot/vmlinuz-5.7.6-2.g1549350-default root=UUID=397167a8-8ff7-4e85-b9c9-d1aa4cc8ee34 splash=silent resume=/dev/disk/by-label/swap quiet loglevel=3 intel_iommu=on net.ifnames=0 biosdevname=0 zswap.enabled=1 zswap.compressor=lz4 zswap.max_pool_percent=20 zswap.zpool=z3fold mitigations=off

    Last thing. When I check what modules are on with lsmod, lz4 and z3fold are present. Doesn't this indicate that they are being loaded too late?
    Last edited by nikuningyou; 28-Jun-2020 at 07:06. Reason: Formatting/grammar
    Desktop: Intel Core i7-8700K, Intel UHD 630, 16 GB of RAM; Laptop: ASUS N76VZ (Intel Core i7-3610QM, Intel HD 4000 + NVIDIA GT 650M, 16 GB of RAM), both running openSUSE Leap 15.2.

  2. #2

    Default Re: zswap can't use lz4 compression algorithm and z3fold pool anymore

    Disabled the stable kernel repository, switched to standard Tumbleweed kernel and got no results. I wonder if something in the 5.7 kernel changed that caused the problem.
    By the way, can anyone provide me with 5.6 kernel to prove that? Mine was removed after updates, so I don't have it anymore.
    Desktop: Intel Core i7-8700K, Intel UHD 630, 16 GB of RAM; Laptop: ASUS N76VZ (Intel Core i7-3610QM, Intel HD 4000 + NVIDIA GT 650M, 16 GB of RAM), both running openSUSE Leap 15.2.

  3. #3

    Default Re: zswap can't use lz4 compression algorithm and z3fold pool anymore

    As I suspected, lz4/z3fold modules are being loaded after the zswap starts:
    Jun 29 14:01:50 hostname kernel: zswap: compressor lz4 not available, using default lzo
    Jun 29 14:01:50 hostname kernel: zswap: zpool z3fold not available, using default zbud
    ...
    Jun 29 14:01:50 hostname systemd-modules-load[255]: Inserted module 'lz4'
    Jun 29 14:01:50 hostname systemd-modules-load[255]: Inserted module 'z3fold'
    Is there anything I can do with this? This is not critical for me, but still irritating.
    Desktop: Intel Core i7-8700K, Intel UHD 630, 16 GB of RAM; Laptop: ASUS N76VZ (Intel Core i7-3610QM, Intel HD 4000 + NVIDIA GT 650M, 16 GB of RAM), both running openSUSE Leap 15.2.

  4. #4
    Join Date
    Sep 2012
    Posts
    5,907

    Default Re: zswap can't use lz4 compression algorithm and z3fold pool anymore

    Quote Originally Posted by nikuningyou View Post
    As I suspected, lz4/z3fold modules are being loaded after the zswap starts
    zswap is built into kernel; there is no way you can load external modules before it starts.

    Is there anything I can do with this?
    Do not enable zswap on boot, enable it later after setting desired parameters. It can actually be enabled (and disabled) at any time: https://www.kernel.org/doc/html/latest/vm/zswap.html

  5. #5

    Default Re: zswap can't use lz4 compression algorithm and z3fold pool anymore

    Quote Originally Posted by arvidjaar View Post
    zswap is built into kernel; there is no way you can load external modules before it starts.


    Do not enable zswap on boot, enable it later after setting desired parameters. It can actually be enabled (and disabled) at any time: https://www.kernel.org/doc/html/latest/vm/zswap.html
    Thanks, but how do best to manipulate sysfs variables automatically at boot time?
    Desktop: Intel Core i7-8700K, Intel UHD 630, 16 GB of RAM; Laptop: ASUS N76VZ (Intel Core i7-3610QM, Intel HD 4000 + NVIDIA GT 650M, 16 GB of RAM), both running openSUSE Leap 15.2.

  6. #6
    Join Date
    Sep 2012
    Posts
    5,907

    Default Re: zswap can't use lz4 compression algorithm and z3fold pool anymore

    Quote Originally Posted by nikuningyou View Post
    Thanks, but how do best to manipulate sysfs variables automatically at boot time?
    As usual - write service that runs at boot time. You can try existing one like https://github.com/Nefelim4ag/systemd-swap

  7. #7

    Default Re: zswap can't use lz4 compression algorithm and z3fold pool anymore

    Quote Originally Posted by arvidjaar View Post
    As usual - write service that runs at boot time. You can try existing one like https://github.com/Nefelim4ag/systemd-swap
    Thank you very much. Too bad its' scripts does not build RPM for OpenSUSE.
    Desktop: Intel Core i7-8700K, Intel UHD 630, 16 GB of RAM; Laptop: ASUS N76VZ (Intel Core i7-3610QM, Intel HD 4000 + NVIDIA GT 650M, 16 GB of RAM), both running openSUSE Leap 15.2.

  8. #8
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,665
    Blog Entries
    15

    Default Re: zswap can't use lz4 compression algorithm and z3fold pool anymore

    Quote Originally Posted by nikuningyou View Post
    Thank you very much. Too bad its' scripts does not build RPM for OpenSUSE.
    Hi
    That's pretty easy to do, but since it seems fluid (updated 35mins ago) it is probably better to create a quick script to update?

    On OBS you can create a service and trigger that to auto get the source and rebuild and create your rpm locally with osc

    There is always systemd-zram-service?
    Last edited by malcolmlewis; 01-Jul-2020 at 07:22.
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  9. #9
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,665
    Blog Entries
    15

    Default Re: zswap can't use lz4 compression algorithm and z3fold pool anymore

    Quote Originally Posted by nikuningyou View Post
    Thank you very much. Too bad its' scripts does not build RPM for OpenSUSE.
    https://build.opensuse.org/package/s...G/systemd-swap
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  10. #10

    Default Re: zswap can't use lz4 compression algorithm and z3fold pool anymore

    Quote Originally Posted by malcolmlewis View Post
    Hi
    That's pretty easy to do, but since it seems fluid (updated 35mins ago) it is probably better to create a quick script to update?

    On OBS you can create a service and trigger that to auto get the source and rebuild and create your rpm locally with osc

    There is always systemd-zram-service?
    Actually, I am new to OpenSUSE. I am using it since mid-May and don't know how things go here. Also, I am not sure I can write such script without anyone's help.

    That's a repository for the package? Why can't I download it? Is it still building?

    Anyway, it's a bed time for me and tomorrow is a planned electricity outage in my district, so I probably won't be able to test it until evening. But thank you very much, you did a lot of help!
    Desktop: Intel Core i7-8700K, Intel UHD 630, 16 GB of RAM; Laptop: ASUS N76VZ (Intel Core i7-3610QM, Intel HD 4000 + NVIDIA GT 650M, 16 GB of RAM), both running openSUSE Leap 15.2.

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •