Puppet Class: zram

Defined in:
manifests/init.pp

Summary

Configures and loads zram kernel module

Overview

zram

This module configures zram using udev rules (no init scripts or systemd units needed).

Examples:

include zram

Parameters:

  • numdevices (Integer) (defaults to: $facts['processorcount'])

    Number of zram devices. Defaults to the number of processors (‘$facts`).

  • disksize (Integer) (defaults to: (floor(($facts['memorysize_mb']/2)*1048576/$numdevices))

    Size of zram devices. Defaults to half of memory divided by ‘numdevices`.

Author:

  • Steven Pritchard <steven.pritchard@gmail.com>



16
17
18
19
20
21
22
23
24
25
26
27
# File 'manifests/init.pp', line 16

class zram (
  Integer $numdevices = $facts['processorcount'],
  Integer $disksize   = (floor(($facts['memorysize_mb']/2)*1048576/$numdevices)),
) {
  contain zram::install
  contain zram::config
  contain zram::load

  Class['zram::install']
  -> Class['zram::config']
  -> Class['zram::load']
}