diff --git a/manifests/init.pp b/manifests/init.pp index c4b6a863e..3a92912db 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -2,6 +2,7 @@ $package_ensure = 'present', $logfile = '/var/log/memcached.log', $max_memory = false, + $item_size = false, $lock_memory = false, $listen_ip = '0.0.0.0', $tcp_port = 11211, diff --git a/templates/memcached.conf.erb b/templates/memcached.conf.erb index 03344d5da..f6097fa4f 100644 --- a/templates/memcached.conf.erb +++ b/templates/memcached.conf.erb @@ -45,3 +45,9 @@ logfile <%= logfile -%> # Number of threads to use to process incoming requests. -t <%= processorcount %> + +<% if @item_size -%> +# Override the default size of each slab page +-I <%= item_size %> +<% end -%> + diff --git a/templates/memcached_sysconfig.erb b/templates/memcached_sysconfig.erb index 3c980309b..84d285ffc 100644 --- a/templates/memcached_sysconfig.erb +++ b/templates/memcached_sysconfig.erb @@ -17,5 +17,8 @@ end if @udp_port result << '-U ' + udp_port end +if @item_size + result << '-I ' + item_size +end result << '-t ' + processorcount -%><%= result.join(' ') -%>"