Package: zram-tools Version: 0.3.2.1-1 Severity: wishlist -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Dear Maintainer, Please consider updating the defaults to make the package suitable for installation on most Debian machines. swap-on-zram has the potential to replace conventional swap. Fedora has done this[1] by default not just for IoT devices but even for desktops. In FreedomBox, I have proposed to use it as the default swap solution[2]. The current defaults lead to a hard-coded 256MiB of swap space. This is useful for single board computers with about 512MiB of RAM but not very useful for other machines. Instead, consider making that 50% of the available RAM. On systems that don't typically use swap, this will only incur a 0.1% overhead[3]. RAM will not be get pre-allocated for the zram device. It is only allocated when necessary. Further, the configuration file /etc/default/zramswap has incorrect description for PERCENT parameter. It says, "Specifies the amount of RAM that should be used for zram based on a percentage the total amount of available memory This takes precedence and overrides SIZE below". The disksize kernel parameter for the zram device computed using the above configuration option is about the amount of space available in the newly create block device. The amount of RAM that the device will consume depends on compression. Typically 1:2 compression is expected. So, if PERCENT is set to 50% on a 8GiB machine, then 4GiB of swap space will be available and on an average case that will consume 2GiB of RAM. What I am proposing is this: - -# Specifies the amount of RAM that should be used for zram - -# based on a percentage the total amount of available memory +# Specifies the size of swap space that should be created with the zram device +# computed as a percentage of the total amount of available memory. # This takes precedence and overrides SIZE below - -#PERCENT=50 +PERCENT=50 Thank you for packaging and maintaining zram-tools. Also consider systemd-zram- generator[4]. Links: 1) https://fedoraproject.org/wiki/Changes/SwapOnZRAM 2) https://salsa.debian.org/freedombox-team/freedombox/-/merge_requests/2033 3) https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/admin- guide/blockdev/zram.rst 4) https://github.com/systemd/zram-generator/ - -- Sunil - -- System Information: Debian Release: 10.8 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.9.0-0.bpo.5-amd64 (SMP w/4 CPU cores) Kernel taint flags: TAINT_FIRMWARE_WORKAROUND, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_IN.UTF-8, LC_CTYPE=en_IN.UTF-8 (charmap=UTF-8), LANGUAGE=en_IN.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages zram-tools depends on: ii bc 1.07.1-2+b1 zram-tools recommends no packages. zram-tools suggests no packages. - -- Configuration Files: /etc/default/zramswap changed [not included] - -- no debconf information -----BEGIN PGP SIGNATURE----- iQJFBAEBCgAvFiEE5xPDY9ZyWnWupXSBQ+oc/wqnxfIFAmAtxbYRHHN1bmlsQG1l ZGhhcy5vcmcACgkQQ+oc/wqnxfImUBAArorWb/sGYvZ16N7nMTIK+U/8mciG8LZ7 kF6l3eSweGXjp9eyaP4xjyTAT9JuXfgbey3msR0JR0mjQvAFN2Fp3wNws3h4xC0O DmrPn2LGczamjX0FZyUs4tDG22zhv7PFPX3NqNtusjZE5WRWxNJrNChl3gBjydW7 QqW7k/vcm2ajpz3csDubVehvIE5qMkK83DFs+/cspQpN7W/B0wgW066mQ9FOGlq5 ozogZKHS6BreDgR7YFxS5EV0HGyG+1umCAAWfMmnY9PK85yGBccWzutcqC81d/xW PiazkvXWA5U8tlCt+ev8E1OGBwMRxlAq0Vri0rq9+wI0bHHxHCDvOPMtz+p1Yrhh XzvsocbqqqkmM7VfWova+97zM+QS6RmzwhgfuaALNHtND7F5eeXcZFpbDI+ldr5b LltQsRBDuHpRFYPPvdy4j4BgN0mbIRgQweLTit3m+iKVXlOtm9TEQlp9E8hXSlg9 2RnBbjhXjFtLhpqoaX1qQZUOGLb8FFTENkWYDljzeP1JjjdpVWGt6/YgMGDTFSX2 mvHdRFSIFKlQR7x99DxMBOcufHmBr75V0j1Rp+S0PWuwYhzwZpHT7yWxFaSghksM vDVc/ZGJQ+BBBFOXrFHfnlESXqyYelGyubnfU+8xwlRzP7Adpx04s+BxGpdFddgm LtJEr1/RggI= =4ibq -----END PGP SIGNATURE-----