zram-init default zstd settings do not work with alpine 3.9.1
It seems zstd support for zram is not compiled with the kernel, and the package defaults to it.
I expected the default configuration to work as it does on ubuntu or debian.
There was also no log concerning this, I was only able to see that it failed by accidentally looking at the AWS console screen shots attached. I worked with the maintainer to add logging support for these messages. They are in the current master branch.
zram-init package does not require package util-linux which provides zramctl.
When the system does not have zramctl installed zram-init with the default zstd configuration will throw an error on console that zstd is not supported and then fall back to lzo as default.
(see attachment zram_failed.png)
When util-linux is installed providing zramctl the zram-init script will use the utility to setup the zram block devices.
It will pass the -azstd to zramctl and it will completely fail to create the device. In the current package there are no error messages in the logs, only on console. Again this is fixed in current master of zram-init.
(see attachment zramctl_failed.png)
The maintainer says this is not a bug in the package:
https://github.com/vaeth/zram-init/issues/15
I would guess that Alpine needs to have a kernel with CONFIG_CRYPTO_ZSTD enabled for the package to work as designed.
(from redmine: issue id 10044, created on 2019-03-05, closed on 2019-04-08)
- Changesets:
- Revision fff44813 by Natanael Copa on 2019-03-05T10:11:17Z:
community/zram-init: fix depend and default algo
zram-init depends on zramctl from util-linux so add that as explicit
depends.
the alpine kernel does not support crypto zstd so use lz4 algo as
default.
ref #10044
- Revision 9856ed28 by Natanael Copa on 2019-03-08T09:53:27Z:
main/linux-vanilla: enable crypto zstd for all arches
ref #10044
- Revision 4fcd7630 by Natanael Copa on 2019-03-13T11:55:45Z:
main/linux-vanilla: enable crypto zstd for all arches
fixes #10044
(cherry picked from commit 9856ed281551d7ec3fd9a6ae34cbaaf6c4fa0a94)