The current default is 1024 however this is not sufficent for most
deployments and it will cause a lot of issues if it does hit the
limit as the server will stop responding.
The overhead for this is very low and other deployment tooling
usually sets this to 8192[1], so 4096 is even very conservative.
[1]: https://github.com/saz/puppet-memcached/blob/bb9d55a2/manifests/init.pp#L26
Change-Id: I604f96a9431076e1f630d2045eac4c88a92935c1
(cherry picked from commit d784ea1846)
56 lines
2.2 KiB
YAML
56 lines
2.2 KiB
YAML
---
|
|
# Copyright 2014, Rackspace US, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
## Logging level
|
|
debug: False
|
|
|
|
## APT Cache Options
|
|
cache_timeout: 600
|
|
|
|
# Set the package install state for distribution packages
|
|
# Options are 'present' and 'latest'
|
|
memcached_package_state: "latest"
|
|
|
|
# MemcacheD sets 'PrivateDevices=True' for its systemd unit by default when
|
|
# installed into a container. This provides some additional security, but it
|
|
# causes problems with creating mount namespaces on CentOS 7 with systemd 219.
|
|
# While the security enhancements are helpful on bare metal hosts with
|
|
# multiple services running, they are not as helpful when MemcacheD is running
|
|
# in a container with its own isolated namespaces.
|
|
#
|
|
# Related bugs:
|
|
# https://bugs.launchpad.net/openstack-ansible/+bug/1697531
|
|
# https://github.com/lxc/lxc/issues/1623
|
|
# https://github.com/systemd/systemd/issues/6121
|
|
#
|
|
# Setting the following variable to 'yes' will disable the PrivateDevices
|
|
# setting in the systemd unit file for MemcacheD on CentOS 7 hosts.
|
|
memcached_disable_privatedevices: no
|
|
|
|
# The default memcache memory setting is to use .25 of the available system ram
|
|
# as long as that value is < 8192. However you can set the `memcached_memory`
|
|
# value to whatever you like as an override.
|
|
base_memcached_memory: "{{ ansible_memtotal_mb | default(4096) }}"
|
|
memcached_memory: "{{ base_memcached_memory | int // 4 if base_memcached_memory | int // 4 < 8192 else 8192 }}"
|
|
|
|
memcached_port: 11211
|
|
memcached_listen: "127.0.0.1"
|
|
memcached_log: /var/log/memcached/memcached.log
|
|
memcached_connections: 4096
|
|
memcached_threads: 4
|
|
memcached_file_limits: "{{ memcached_connections | int + 1024 }}"
|
|
|
|
install_test_packages: False
|