Examples of dynamic adjustment redis-cluster memory

When redis.conf maximum memory configuration to 10G when the program has just filled, but there is a physical host memory,

At this time, the memory size can be set by example config set xxxx xxxx, without restarting instance.

 
Gets the size of the current maximum memory:
config get maxmemory

 

Modify the memory size:

config set maxmemory 32212254720

 

There is a problem, is an example of the restart when will restore the value of maxmemory configuration file settings, so after the completion of the dynamic change in redis command line, you need to maxmemory the corresponding configuration file is also changed to the same value, so as not to leave the pit .

You can dynamically adjust the parameters refer to the official document: https://redis.io/commands/config-set

Guess you like

Origin www.cnblogs.com/xingxiz/p/10966771.html