puppet: Allow enabling "stats sizes" in memcached.

This commit is contained in:
Alex Vandiver 2024-02-23 20:11:01 +00:00 committed by Tim Abbott
parent dfdaddea38
commit 8673f87907
3 changed files with 11 additions and 0 deletions

View File

@ -306,6 +306,12 @@ Override the maximum size that an item in memcached can store. This defaults to
1m; adjusting it should only be necessary if your Zulip server has organizations
which have more than 20k users.
#### `size_reporting`
Set to a true value to enable object size reporting in memcached. This incurs a
small overhead for every store or delete operation, but allows a
memcached_exporter to report precise item size distribution.
### `[loadbalancer]`
#### `ips`

View File

@ -18,6 +18,7 @@ class zulip::profile::memcached {
package { $memcached_packages: ensure => installed }
$memcached_max_item_size = zulipconf('memcached', 'max_item_size', '1m')
$memcached_size_reporting = zulipconf('memcached', 'size_reporting', false)
$memcached_memory = zulipconf('memcached', 'memory', $zulip::common::total_memory_mb / 8)
file { '/etc/sasl2':
ensure => directory,

View File

@ -55,3 +55,7 @@ logfile /var/log/memcached.log
# Larger max-item-size
-I <%= @memcached_max_item_size %>
<% end -%>
<%- if @memcached_size_reporting %>
# Enable `stats sizes` (see https://github.com/memcached/memcached/blob/master/doc/protocol.txt)
-o track_sizes
<% end -%>