Attributes
The attributes are set to be default values. These should be your preferred settings, with the intent that where this is needed as a use case, it can be overridden by the cookbook/recipe that calls the zram
cookbook.
# Set the organization namespace prefix (the first key in the node hash tree).
org = node['org_namespace']
# Set the default percent of total memory to be used as swap.
default[org]['zram']['percent_of_memory'] = 10
# Set sysctl params.
default[org]['zram']['sysctl']['params']['vm.swappiness'] = 100
default[org]['zram']['sysctl']['params']['vm.vfs_cache_pressure'] = 500
default[org]['zram']['sysctl']['params']['vm.dirty_background_ratio'] = 1
default[org]['zram']['sysctl']['params']['vm.dirty_ratio'] = 50