Memory management in Managed Service for Redis
For user data on the Managed Service for Redis cluster hosts, 75% of the total amount of RAM is allocated. The remaining RAM is committed to the Redis process. You can reduce the amount of RAM allocated for user data by using the Maxmemory percent parameter. This may be helpful if an out-of-memory error occurs in the cluster.
By committing RAM on the host, you can:
Improving the performance and stability of the Redis process
Managed Service for Redis cluster hosts use the vm.overcommit_memory = 0
Linux kernel setting
Backup stability
Backups in Managed Service for Redis are created based on a consistent snapshot of the process memory image. The snapshot is created by copying the original Redis process through the fork()
system call.
With fork()
, you can reduce RAM usage, as the original Redis process and its copy share the same memory pages. The committed RAM and the vm.overcommit_memory = 0
setting make fork()
more secure, since creating copies does not affect the main Redis process performance.
When fork()
is running, it uses the Copy-on-Write
- Make sure to start backups when the cluster load is minimum.
- Increase the amount of RAM by upgrading the host class.