Compare commits
17 Commits
pkg/dev/eo
...
develop
Author | SHA1 | Date | |
---|---|---|---|
92b8541fa2 | |||
9bfa3a41f5 | |||
1ca2797bb3 | |||
f899c6516c | |||
f7ce4d51d6 | |||
ae562d6a60 | |||
c568646a7d | |||
c26de6593e | |||
e164823580 | |||
15dbc98eb8 | |||
dc5fc136c8 | |||
23d8921d16 | |||
07e64177f1 | |||
56a630eadb | |||
ccc8629b8e | |||
0c0202ba87 | |||
2081ae6d7f |
@ -2,6 +2,7 @@
|
|||||||
<creole>
|
<creole>
|
||||||
<files>
|
<files>
|
||||||
<!-- System configuration -->
|
<!-- System configuration -->
|
||||||
|
<file filelist='redis' name='/etc/sysctl.d/100-redis-tuning.conf' source='redis_sysctl.conf' mkdir='True' rm='True'/>
|
||||||
<file filelist='redis' name='/etc/redis/redis.conf' mkdir='True' rm='True'/>
|
<file filelist='redis' name='/etc/redis/redis.conf' mkdir='True' rm='True'/>
|
||||||
<file filelist='redisSlave' name='/etc/redis/redis-slave.conf' mkdir='True' rm='True'/>
|
<file filelist='redisSlave' name='/etc/redis/redis-slave.conf' mkdir='True' rm='True'/>
|
||||||
<file filelist='redisCl' name='/etc/redis/cluster.conf' source='redis-cluster.conf' mkdir='True' rm='True'/>
|
<file filelist='redisCl' name='/etc/redis/cluster.conf' source='redis-cluster.conf' mkdir='True' rm='True'/>
|
||||||
@ -31,8 +32,9 @@
|
|||||||
<variable name='redisSlaveInstance' type='oui/non' description="Voulez-vous lancer une instance esclave Redis sur ce serveur ?">
|
<variable name='redisSlaveInstance' type='oui/non' description="Voulez-vous lancer une instance esclave Redis sur ce serveur ?">
|
||||||
<value>non</value>
|
<value>non</value>
|
||||||
</variable>
|
</variable>
|
||||||
|
|
||||||
<!-- Instance Principale-->
|
<!-- Instance Principale-->
|
||||||
<variable name='redisInstanceName' type='string' description="Nom de l'instance secondaire"/>
|
<variable name='redisInstanceName' type='string' description="Nom de l'instance principale"/>
|
||||||
<variable name='redisPort' type='number' description="Port d'écoute du service Redis">
|
<variable name='redisPort' type='number' description="Port d'écoute du service Redis">
|
||||||
<value>6379</value>
|
<value>6379</value>
|
||||||
</variable>
|
</variable>
|
||||||
@ -49,9 +51,13 @@
|
|||||||
<!-- Instance Secondaire -->
|
<!-- Instance Secondaire -->
|
||||||
<variable name='redisSlaveInstanceName' type='string' description="Nom de l'instance secondaire"/>
|
<variable name='redisSlaveInstanceName' type='string' description="Nom de l'instance secondaire"/>
|
||||||
<variable name='redisSlaveInstanceMaster' type='string' description="Nom du noeud a répliquer sur l'instance secondaire"/>
|
<variable name='redisSlaveInstanceMaster' type='string' description="Nom du noeud a répliquer sur l'instance secondaire"/>
|
||||||
<variable name='redisPortSlave' type='number' description="Port d'écoute du service Redis">
|
<variable name='redisMasterIPSlave' type='domain' description="Nom de domaine du service Redis master" mandatory="True"/>
|
||||||
|
<variable name='redisMasterPortSlave' type='number' description="Port d'écoute du service Redis master">
|
||||||
<value>6379</value>
|
<value>6379</value>
|
||||||
</variable>
|
</variable>
|
||||||
|
<variable name='redisPortSlave' type='number' description="Port d'écoute du service Redis slave">
|
||||||
|
<value>8379</value>
|
||||||
|
</variable>
|
||||||
<variable name='redisClPortSlave' type='number' description="Port d'écoute du service Cluster Redis"/>
|
<variable name='redisClPortSlave' type='number' description="Port d'écoute du service Cluster Redis"/>
|
||||||
<variable name='redisMaxMemorySlave' type='number' description="Quantité de mémoire utilisable par Redis en Mo">
|
<variable name='redisMaxMemorySlave' type='number' description="Quantité de mémoire utilisable par Redis en Mo">
|
||||||
<value>512</value>
|
<value>512</value>
|
||||||
@ -86,6 +92,23 @@
|
|||||||
<variable name='rdClMemberSlaveRole' type='string' description="Rôle de l'instance secondaire" hidden='True'/>
|
<variable name='rdClMemberSlaveRole' type='string' description="Rôle de l'instance secondaire" hidden='True'/>
|
||||||
<variable name='rdClMemberSlaveMaster' type='string' description="Noeud du noeud répliquer sur cette instance secondaire"/>
|
<variable name='rdClMemberSlaveMaster' type='string' description="Noeud du noeud répliquer sur cette instance secondaire"/>
|
||||||
</family>
|
</family>
|
||||||
|
<family name='Redis tunning' mode='expert'>
|
||||||
|
<variable name='redisMaxClients' type='number' description="Maximum allowed clients">
|
||||||
|
<value>10000</value>
|
||||||
|
</variable>
|
||||||
|
<variable name='rdCliOutBuffHardLimit' type='number' description="Client output buffer hard limit (for slave)">
|
||||||
|
<value>512</value>
|
||||||
|
</variable>
|
||||||
|
<variable name='rdCliOutBuffSoftLimit' type='number' description="Client output buffer soft limit (for slave)">
|
||||||
|
<value>256</value>
|
||||||
|
</variable>
|
||||||
|
<variable name='rdSaveDisable' type='oui/non' description="Désactiver la persistence des données sur les maitres et esclaves">
|
||||||
|
<value>non</value>
|
||||||
|
</variable>
|
||||||
|
<variable name='rdAOFDisable' type='oui/non' description="Désactiver la sauvegarde AOF sur les maitres et esclaves">
|
||||||
|
<value>non</value>
|
||||||
|
</variable>
|
||||||
|
</family>
|
||||||
<separators>
|
<separators>
|
||||||
<separator name='redisInstanceName'>Instance Principale</separator>
|
<separator name='redisInstanceName'>Instance Principale</separator>
|
||||||
<separator name='redisSlaveInstanceName'>Instance Secondaire</separator>
|
<separator name='redisSlaveInstanceName'>Instance Secondaire</separator>
|
||||||
@ -130,14 +153,32 @@
|
|||||||
<condition name='disabled_if_in' source='redisMode'>
|
<condition name='disabled_if_in' source='redisMode'>
|
||||||
<param>Local</param>
|
<param>Local</param>
|
||||||
<target type='variable'>redisRole</target>
|
<target type='variable'>redisRole</target>
|
||||||
|
<target type='variable'>redisInstanceName</target>
|
||||||
<target type='variable'>redisSlaveInstance</target>
|
<target type='variable'>redisSlaveInstance</target>
|
||||||
<target type='filelist'>redisCl</target>
|
<target type='filelist'>redisCl</target>
|
||||||
<target type='variable'>redisClPort</target>
|
<target type='variable'>redisClPort</target>
|
||||||
</condition>
|
</condition>
|
||||||
|
|
||||||
|
<condition name='disabled_if_in' source='redisMode'>
|
||||||
|
<param>Local avec slave distant</param>
|
||||||
|
<target type='variable'>redisRole</target>
|
||||||
|
<target type='variable'>redisInstanceName</target>
|
||||||
|
<target type='variable'>redisSlaveInstanceName</target>
|
||||||
|
<target type='variable'>redisSlaveInstanceMaster</target>
|
||||||
|
<target type='variable'>redisClPortSlave</target>
|
||||||
|
<target type='variable'>redisClPort</target>
|
||||||
|
</condition>
|
||||||
|
|
||||||
|
<condition name='disabled_if_not_in' source='redisMode'>
|
||||||
|
<param>Local avec slave distant</param>
|
||||||
|
<target type='variable'>redisMasterIPSlave</target>
|
||||||
|
<target type='variable'>redisMasterPortSlave</target>
|
||||||
|
</condition>
|
||||||
|
|
||||||
<condition name='disabled_if_in' source='redisRole'>
|
<condition name='disabled_if_in' source='redisRole'>
|
||||||
<param>Node</param>
|
<param>Node</param>
|
||||||
<target type='filelist'>redisCl</target>
|
<target type='filelist'>redisCl</target>
|
||||||
|
<target type='variable'>redisInstanceName</target>
|
||||||
<target type='variable'>rdClMember</target>
|
<target type='variable'>rdClMember</target>
|
||||||
<target type='variable'>rdClMemberIP</target>
|
<target type='variable'>rdClMemberIP</target>
|
||||||
<target type='variable'>rdClMemberPort</target>
|
<target type='variable'>rdClMemberPort</target>
|
||||||
@ -177,7 +218,7 @@
|
|||||||
<param>['Leader','Node']</param>
|
<param>['Leader','Node']</param>
|
||||||
</check>
|
</check>
|
||||||
<check name="valid_enum" target="redisMode">
|
<check name="valid_enum" target="redisMode">
|
||||||
<param>['Local','Cluster']</param>
|
<param>['Local', 'Local avec slave distant', 'Cluster']</param>
|
||||||
</check>
|
</check>
|
||||||
<check name="valid_enum" target="rdClMemberRole">
|
<check name="valid_enum" target="rdClMemberRole">
|
||||||
<param>['master','slave']</param>
|
<param>['master','slave']</param>
|
||||||
@ -203,35 +244,18 @@
|
|||||||
<param>slave</param>
|
<param>slave</param>
|
||||||
</auto>
|
</auto>
|
||||||
|
|
||||||
<fill name='intAdd' target='rdClMemberSlavePort'>
|
|
||||||
<param type='eole' name='num1'>rdClMemberPort</param>
|
|
||||||
<param name='num2'>2000</param>
|
|
||||||
</fill>
|
|
||||||
|
|
||||||
<fill name='calc_val' target='redisInstanceName'>
|
<fill name='calc_val' target='redisInstanceName'>
|
||||||
<param type='eole' name='valeur'>nom_machine</param>
|
<param type='eole' name='valeur'>nom_machine</param>
|
||||||
</fill>
|
</fill>
|
||||||
|
|
||||||
<fill name='intAdd' target='redisClPort'>
|
|
||||||
<param type='eole' name='num1'>redisPort</param>
|
|
||||||
<param name='num2'>10000</param>
|
|
||||||
</fill>
|
|
||||||
|
|
||||||
<fill name='intAdd' target='redisPortSlave'>
|
|
||||||
<param type='eole' name='num1'>redisPort</param>
|
|
||||||
<param name='num2'>2000</param>
|
|
||||||
</fill>
|
|
||||||
|
|
||||||
<fill name='intAdd' target='redisClPortSlave'>
|
|
||||||
<param type='eole' name='num1'>redisPortSlave</param>
|
|
||||||
<param name='num2'>10000</param>
|
|
||||||
</fill>
|
|
||||||
<fill name='calc_val' target='redisMaxMemorySlave'>
|
<fill name='calc_val' target='redisMaxMemorySlave'>
|
||||||
<param type='eole' name='valeur'>redisMaxMemory</param>
|
<param type='eole' name='valeur'>redisMaxMemory</param>
|
||||||
</fill>
|
</fill>
|
||||||
|
|
||||||
<fill name='calc_val' target='redisMemoryPolicySlave'>
|
<fill name='calc_val' target='redisMemoryPolicySlave'>
|
||||||
<param type='eole' name='valeur'>redisMemoryPolicy</param>
|
<param type='eole' name='valeur'>redisMemoryPolicy</param>
|
||||||
</fill>
|
</fill>
|
||||||
|
|
||||||
<fill name='calc_val' target='redisTCPKeepAliveSlave'>
|
<fill name='calc_val' target='redisTCPKeepAliveSlave'>
|
||||||
<param type='eole' name='valeur'>redisTCPKeepAlive</param>
|
<param type='eole' name='valeur'>redisTCPKeepAlive</param>
|
||||||
</fill>
|
</fill>
|
||||||
|
@ -14,12 +14,6 @@ Group=redis
|
|||||||
RuntimeDirectory=redis
|
RuntimeDirectory=redis
|
||||||
RuntimeDirectoryMode=2755
|
RuntimeDirectoryMode=2755
|
||||||
|
|
||||||
ExecStartPre=-/bin/run-parts --verbose /etc/redis/redis-server.pre-up.d
|
|
||||||
ExecStartPost=-/bin/run-parts --verbose /etc/redis/redis-server.post-up.d
|
|
||||||
ExecStop=-/bin/run-parts --verbose /etc/redis/redis-server.pre-down.d
|
|
||||||
ExecStop=/bin/kill -s TERM $MAINPID
|
|
||||||
ExecStopPost=-/bin/run-parts --verbose /etc/redis/redis-server.post-down.d
|
|
||||||
|
|
||||||
UMask=007
|
UMask=007
|
||||||
PrivateTmp=yes
|
PrivateTmp=yes
|
||||||
LimitNOFILE=65535
|
LimitNOFILE=65535
|
||||||
@ -29,7 +23,16 @@ ReadOnlyDirectories=/
|
|||||||
ReadWriteDirectories=-/var/lib/redis
|
ReadWriteDirectories=-/var/lib/redis
|
||||||
ReadWriteDirectories=-/var/log/redis
|
ReadWriteDirectories=-/var/log/redis
|
||||||
ReadWriteDirectories=-/var/run/redis
|
ReadWriteDirectories=-/var/run/redis
|
||||||
CapabilityBoundingSet=~CAP_SYS_PTRACE
|
|
||||||
|
NoNewPrivileges=true
|
||||||
|
CapabilityBoundingSet=CAP_SETGID CAP_SETUID CAP_SYS_RESOURCE
|
||||||
|
MemoryDenyWriteExecute=true
|
||||||
|
ProtectKernelModules=true
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
RestrictRealtime=true
|
||||||
|
RestrictNamespaces=true
|
||||||
|
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
|
||||||
|
|
||||||
# redis-server can write to its own config file when in cluster mode so we
|
# redis-server can write to its own config file when in cluster mode so we
|
||||||
# permit writing there by default. If you are not using this feature, it is
|
# permit writing there by default. If you are not using this feature, it is
|
||||||
|
@ -113,6 +113,14 @@ function redisClusterIsOK()
|
|||||||
}
|
}
|
||||||
|
|
||||||
CONF="/etc/redis/cluster.conf"
|
CONF="/etc/redis/cluster.conf"
|
||||||
|
INITFLAG="/usr/share/eole/redisinit.flg"
|
||||||
|
|
||||||
|
sysConf=$(grep "vm.overcommit_memory" /etc/sysctl.conf 2>&1 > /dev/null)
|
||||||
|
if [[ ${?} -ne 0 ]]
|
||||||
|
then
|
||||||
|
echo "vm.overcommit_memory=1" >> /etc/sysctl.conf
|
||||||
|
sysctl -p /etc/sysctl.conf
|
||||||
|
fi
|
||||||
|
|
||||||
[[ ! -e ${CONF} ]] && exit 0
|
[[ ! -e ${CONF} ]] && exit 0
|
||||||
|
|
||||||
@ -150,9 +158,8 @@ do
|
|||||||
MASTERS+=([${name}]=${master})
|
MASTERS+=([${name}]=${master})
|
||||||
done < ${CONF}
|
done < ${CONF}
|
||||||
|
|
||||||
# If the cluster is "ok" don't do anything
|
# Disable Transparent Huge Page support on kernel
|
||||||
st=$(redisClusterIsOK ${LeaderIP} ${LeaderPort})
|
echo never > /sys/kernel/mm/transparent_hugepage/enabled
|
||||||
#[[ ${?} -eq 0 ]] && exit 0
|
|
||||||
|
|
||||||
if [[ ${1} == "forget" ]]
|
if [[ ${1} == "forget" ]]
|
||||||
then
|
then
|
||||||
@ -160,6 +167,17 @@ then
|
|||||||
exit ${?}
|
exit ${?}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# If the cluster is "ok" don't do anything
|
||||||
|
st=$(redisClusterIsOK ${LeaderIP} ${LeaderPort})
|
||||||
|
[[ ${?} -eq 0 ]] && exit 0
|
||||||
|
|
||||||
|
|
||||||
|
if [[ -e ${INITFLAG} ]]
|
||||||
|
then
|
||||||
|
echo "Init allready done ... nothing to do"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
echo " * Organise Cluster Meeting."
|
echo " * Organise Cluster Meeting."
|
||||||
for node in ${NAMES[@]}
|
for node in ${NAMES[@]}
|
||||||
do
|
do
|
||||||
@ -232,5 +250,6 @@ echo
|
|||||||
redisRun ${LeaderIP} ${LeaderPort} cluster info
|
redisRun ${LeaderIP} ${LeaderPort} cluster info
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
touch ${INITFLAG}
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -83,6 +83,12 @@ protected-mode no
|
|||||||
# If port 0 is specified Redis will not listen on a TCP socket.
|
# If port 0 is specified Redis will not listen on a TCP socket.
|
||||||
port %%redisPortSlave
|
port %%redisPortSlave
|
||||||
|
|
||||||
|
%if %%redisMode == 'Local avec slave distant'
|
||||||
|
|
||||||
|
slaveof %%redisMasterIPSlave %%redisMasterPortSlave
|
||||||
|
|
||||||
|
%end if
|
||||||
|
|
||||||
# TCP listen() backlog.
|
# TCP listen() backlog.
|
||||||
#
|
#
|
||||||
# In high requests-per-second environments you need an high backlog in order
|
# In high requests-per-second environments you need an high backlog in order
|
||||||
@ -199,9 +205,13 @@ databases 16
|
|||||||
#
|
#
|
||||||
# save ""
|
# save ""
|
||||||
|
|
||||||
|
%if %%rdSaveDisable == 'oui'
|
||||||
|
save ""
|
||||||
|
%else
|
||||||
save 900 1
|
save 900 1
|
||||||
save 300 10
|
save 300 10
|
||||||
save 60 10000
|
save 60 10000
|
||||||
|
%end if
|
||||||
|
|
||||||
# By default Redis will stop accepting writes if RDB snapshots are enabled
|
# By default Redis will stop accepting writes if RDB snapshots are enabled
|
||||||
# (at least one save point) and the latest background save failed.
|
# (at least one save point) and the latest background save failed.
|
||||||
@ -291,7 +301,7 @@ dir /var/lib/redis
|
|||||||
# Once the limit is reached Redis will close all the new connections sending
|
# Once the limit is reached Redis will close all the new connections sending
|
||||||
# an error 'max number of clients reached'.
|
# an error 'max number of clients reached'.
|
||||||
#
|
#
|
||||||
# maxclients 10000
|
maxclients %%redisMaxClients
|
||||||
|
|
||||||
# Don't use more memory than the specified amount of bytes.
|
# Don't use more memory than the specified amount of bytes.
|
||||||
# When the memory limit is reached Redis will try to remove keys
|
# When the memory limit is reached Redis will try to remove keys
|
||||||
@ -316,7 +326,7 @@ dir /var/lib/redis
|
|||||||
# limit for maxmemory so that there is some free RAM on the system for slave
|
# limit for maxmemory so that there is some free RAM on the system for slave
|
||||||
# output buffers (but this is not needed if the policy is 'noeviction').
|
# output buffers (but this is not needed if the policy is 'noeviction').
|
||||||
#
|
#
|
||||||
maxmemory %{redisMaxMemory}mb
|
maxmemory %%{redisMaxMemory}mb
|
||||||
|
|
||||||
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
|
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
|
||||||
# is reached. You can select among five behaviors:
|
# is reached. You can select among five behaviors:
|
||||||
@ -372,7 +382,11 @@ maxmemory-policy %%redisMemoryPolicySlave
|
|||||||
#
|
#
|
||||||
# Please check http://redis.io/topics/persistence for more information.
|
# Please check http://redis.io/topics/persistence for more information.
|
||||||
|
|
||||||
|
%if %%rdAOFDisable == 'oui'
|
||||||
|
appendonly no
|
||||||
|
%else
|
||||||
appendonly yes
|
appendonly yes
|
||||||
|
%end if
|
||||||
|
|
||||||
# The name of the append only file (default: "appendonly.aof")
|
# The name of the append only file (default: "appendonly.aof")
|
||||||
|
|
||||||
@ -488,6 +502,7 @@ aof-load-truncated yes
|
|||||||
# Set it to 0 or a negative value for unlimited execution without warnings.
|
# Set it to 0 or a negative value for unlimited execution without warnings.
|
||||||
lua-time-limit 5000
|
lua-time-limit 5000
|
||||||
|
|
||||||
|
%if %%getVar('redisMode','Local') == "Cluster"
|
||||||
################################ REDIS CLUSTER ###############################
|
################################ REDIS CLUSTER ###############################
|
||||||
#
|
#
|
||||||
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||||
@ -595,6 +610,7 @@ cluster-require-full-coverage yes
|
|||||||
|
|
||||||
# In order to setup your cluster make sure to read the documentation
|
# In order to setup your cluster make sure to read the documentation
|
||||||
# available at http://redis.io web site.
|
# available at http://redis.io web site.
|
||||||
|
%end if
|
||||||
|
|
||||||
################################## SLOW LOG ###################################
|
################################## SLOW LOG ###################################
|
||||||
|
|
||||||
@ -807,7 +823,7 @@ activerehashing yes
|
|||||||
#
|
#
|
||||||
# Both the hard or the soft limit can be disabled by setting them to zero.
|
# Both the hard or the soft limit can be disabled by setting them to zero.
|
||||||
client-output-buffer-limit normal 0 0 0
|
client-output-buffer-limit normal 0 0 0
|
||||||
client-output-buffer-limit slave 256mb 64mb 60
|
client-output-buffer-limit slave %%{rdCliOutBuffHardLimit}mb %%{rdCliOutBuffSoftLimit}mb 60
|
||||||
client-output-buffer-limit pubsub 32mb 8mb 60
|
client-output-buffer-limit pubsub 32mb 8mb 60
|
||||||
|
|
||||||
# Redis calls an internal function to perform many background tasks, like
|
# Redis calls an internal function to perform many background tasks, like
|
||||||
|
@ -199,9 +199,13 @@ databases 16
|
|||||||
#
|
#
|
||||||
# save ""
|
# save ""
|
||||||
|
|
||||||
|
%if %%rdSaveDisable == 'oui'
|
||||||
|
save ""
|
||||||
|
%else
|
||||||
save 900 1
|
save 900 1
|
||||||
save 300 10
|
save 300 10
|
||||||
save 60 10000
|
save 60 10000
|
||||||
|
%end if
|
||||||
|
|
||||||
# By default Redis will stop accepting writes if RDB snapshots are enabled
|
# By default Redis will stop accepting writes if RDB snapshots are enabled
|
||||||
# (at least one save point) and the latest background save failed.
|
# (at least one save point) and the latest background save failed.
|
||||||
@ -291,7 +295,7 @@ dir /var/lib/redis
|
|||||||
# Once the limit is reached Redis will close all the new connections sending
|
# Once the limit is reached Redis will close all the new connections sending
|
||||||
# an error 'max number of clients reached'.
|
# an error 'max number of clients reached'.
|
||||||
#
|
#
|
||||||
# maxclients 10000
|
maxclients %%redisMaxClients
|
||||||
|
|
||||||
# Don't use more memory than the specified amount of bytes.
|
# Don't use more memory than the specified amount of bytes.
|
||||||
# When the memory limit is reached Redis will try to remove keys
|
# When the memory limit is reached Redis will try to remove keys
|
||||||
@ -316,7 +320,7 @@ dir /var/lib/redis
|
|||||||
# limit for maxmemory so that there is some free RAM on the system for slave
|
# limit for maxmemory so that there is some free RAM on the system for slave
|
||||||
# output buffers (but this is not needed if the policy is 'noeviction').
|
# output buffers (but this is not needed if the policy is 'noeviction').
|
||||||
#
|
#
|
||||||
maxmemory %{redisMaxMemory}mb
|
maxmemory %%{redisMaxMemory}mb
|
||||||
|
|
||||||
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
|
# MAXMEMORY POLICY: how Redis will select what to remove when maxmemory
|
||||||
# is reached. You can select among five behaviors:
|
# is reached. You can select among five behaviors:
|
||||||
@ -372,7 +376,12 @@ maxmemory-policy %%redisMemoryPolicy
|
|||||||
#
|
#
|
||||||
# Please check http://redis.io/topics/persistence for more information.
|
# Please check http://redis.io/topics/persistence for more information.
|
||||||
|
|
||||||
|
%if %%rdAOFDisable == 'oui'
|
||||||
|
appendonly no
|
||||||
|
%else
|
||||||
appendonly yes
|
appendonly yes
|
||||||
|
%end if
|
||||||
|
|
||||||
|
|
||||||
# The name of the append only file (default: "appendonly.aof")
|
# The name of the append only file (default: "appendonly.aof")
|
||||||
|
|
||||||
@ -809,7 +818,7 @@ activerehashing yes
|
|||||||
#
|
#
|
||||||
# Both the hard or the soft limit can be disabled by setting them to zero.
|
# Both the hard or the soft limit can be disabled by setting them to zero.
|
||||||
client-output-buffer-limit normal 0 0 0
|
client-output-buffer-limit normal 0 0 0
|
||||||
client-output-buffer-limit slave 256mb 64mb 60
|
client-output-buffer-limit slave %%{rdCliOutBuffHardLimit}mb %%{rdCliOutBuffSoftLimit}mb 60
|
||||||
client-output-buffer-limit pubsub 32mb 8mb 60
|
client-output-buffer-limit pubsub 32mb 8mb 60
|
||||||
|
|
||||||
# Redis calls an internal function to perform many background tasks, like
|
# Redis calls an internal function to perform many background tasks, like
|
||||||
|
2
tmpl/redis_sysctl.conf
Normal file
2
tmpl/redis_sysctl.conf
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
net.core.somaxconn = 512
|
Reference in New Issue
Block a user