ecdye / zram-config

A complete zram-config utility for swap, directories, and logs to reduce SD, NAND and eMMC block wear.
MIT License
447 stars 54 forks source link

options in /etc/ztab are not applied #118

Closed goebbe closed 1 month ago

goebbe commented 1 month ago

In installed zram-config (0.7) via apt from the repository and try to understand, why my options in /etc/ztab are not applied.

This may be due to an outdated package. But I could not find any information on this.

On LinuxMint 21.3 (based on Ubuntu 22.04) I installed zram-config from the repository via apt-get. The installed version of zram is 0.7 Linux Kernel is 5.15

I created the /etc/ztab manually using sudo nano /etc/ztab and copied the content of ztab (on github) as a start.

These are the relevant lines in /etc/ztab:

# swap  alg             mem_limit       disk_size       swap_priority   page-cluster    swappiness
swap    lz4         100M            300M            75              0               150

After reboot, zram has been started, however the config options of /etc/ztab have not been applied:

$ cat /sys/block/zram0/comp_algorithm
lzo [lzo-rle] lz4 lz4hc 842 zstd 

$ cat /proc/sys/vm/page-cluster
3

$ zramctl
NAME       ALGORITHM DISKSIZE DATA COMPR TOTAL STREAMS MOUNTPOINT
/dev/zram0 lzo-rle       7,7G   4K   74B   12K       4 [SWAP]

Any advice would be appreciated. If this is due to an outdated package, please leave a comment and feel free to close the issue.

ecdye commented 1 month ago

Yes, this is certainly an issue with an outdated package. I believe that the package that you installed is actually completely different from the code in this repository. If you run apt-get --purge zram-config and then install the code in this repo as outlined in the README.md it should work correctly.