Allow adjusting the default slab size ie -I option
This commit is contained in:
parent
10e3797008
commit
0095b5b39d
@ -11,6 +11,7 @@
|
||||
'lock_paged_memory': False,
|
||||
'error_on_mem_full': False,
|
||||
'max_core_file_limit': False,
|
||||
'slab_size_limit': 1m,
|
||||
}
|
||||
} %}
|
||||
{% set memcached = salt['grains.filter_by']({
|
||||
|
@ -34,3 +34,7 @@ PIDBASE="/var/run/memcached/memcached"
|
||||
|
||||
#Other Options
|
||||
MISC_OPTS=""
|
||||
|
||||
{% if get_config_item('slab_size_limit') != '1m' %}
|
||||
MISC_OPTS="$MISC_OPTS -I {{ get_config_item('slab_size_limit') }}"
|
||||
{% endif %}
|
||||
|
@ -47,3 +47,8 @@ logfile {{ get_config_item('log_file') }}
|
||||
# Maximize core file limit
|
||||
# -r
|
||||
{{ '-r' if get_config_item('max_core_file_limit') == 'True' else '' }}
|
||||
|
||||
{% if get_config_item('slab_size_limit') != '1m' %}
|
||||
# Override the size of each slab page in bytes. In mundane words, it adjusts the maximum item size that memcached will accept.
|
||||
-I {{ get_config_item('slab_size_limit') }}
|
||||
{% endif %}
|
||||
|
@ -14,10 +14,14 @@ OPTIONS="$OPTIONS -k"
|
||||
OPTIONS="$OPTIONS -M"
|
||||
{% endif %}
|
||||
|
||||
{% if get_config_item('max_core_file_"limit') == 'True' %}
|
||||
{% if get_config_item('max_core_file_limit') == 'True' %}
|
||||
OPTIONS="$OPTIONS -r"
|
||||
{% endif %}
|
||||
|
||||
{% if get_config_item('slab_size_limit') != '1m' %}
|
||||
OPTIONS="$OPTIONS -I {{ get_config_item('slab_size_limit') }}"
|
||||
{% endif %}
|
||||
|
||||
{% if get_config_item('verbose_level') == '1' %}
|
||||
OPTIONS="$OPTIONS -v >> {{ get_config_item('log_file') }} 2>&1"
|
||||
{% elif get_config_item('verbose_level') == '2' %}
|
||||
|
@ -9,3 +9,4 @@ memcached:
|
||||
lock_paged_memory: False
|
||||
error_on_mem_full: False
|
||||
max_core_file_limit: False
|
||||
slab_size_limit: 1m
|
||||
|
Loading…
Reference in New Issue
Block a user