This module configures zram swap using udev rules (no init scripts or systemd units needed).
Want to know more about zram? Read the Linux kernel documentation.
Creates the following files:
- /lib/udev/zram
- /etc/udev/rules.d/01-zram.rules
- /etc/modprobe.d/zram.conf
Finally, it loads the zram module.
This module requires puppetlabs-stdlib and puppet-kmod.
Make sure you are using a kernel that includes the zram module.
class { 'zram': }
The zram
class accepts the following parameters:
-
numdevices
Number of zram devices. Defaults to the number of processors ($facts['processorcount']
). -
disksize
Size of zram devices. Defaults to half of memory divided bynumdevices
.
See REFERENCE.md
for more details.
This module has been tested on a number of systems. (See
metadata.json
for a full list.) It should work on any
Linux distribution that includes the zram kernel module.
Send me a pull request on GitHub.