mdomlop / systemd-zram

GNU General Public License v3.0
16 stars 3 forks source link

Usability improvements to service script #3

Closed AlexTMjugador closed 5 years ago

AlexTMjugador commented 5 years ago

This pull request adds support for choosing the compression algorithm used to compress the data stored on the zram swap, using the sysfs interface documented in https://www.kernel.org/doc/Documentation/blockdev/zram.txt

It also simplifies memory size calculation, which is now passed unmodified as KiB to the sysfs parameters of zram devices. This fixed a problem on my Ubuntu 18.04 installation where $MEMORY had a value in scientific notation which was not recognized by the zram module.

Also, it removes unnecesary operations to set the number of zram devices to create.

AlexTMjugador commented 5 years ago

I reverted the zram size fraction change because I realized I interpreted the documentation wrong. Sorry about that.