Memory management in Yandex Managed Service for Valkey™
For user data on the Yandex Managed Service for Valkey™ cluster hosts, 75% of the total amount of RAM is allocated. The remaining RAM is reserved for the Valkey™ process's own needs. 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 reserving RAM on the host, you can:
Improving the performance and stability of the Valkey™ process
Yandex Managed Service for Valkey™ cluster hosts use the vm.overcommit_memory = 0 Linux kernel setting
Backup stability
Backups in Yandex Managed Service for Valkey™ are created based on a consistent snapshot of the process memory. The snapshot is created by copying the original Valkey™ process through the fork() system call.
With fork(), you can reduce RAM usage, as the original Valkey™ process and its copy share the same memory pages. Reserved RAM and the vm.overcommit_memory = 0 setting make fork() more secure: creating backups does not affect the performance of the main Valkey™ process.
fork() 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.
Data tiering
Data tiering allows you to move infrequently used data from RAM to disk. This reduces RAM requirements and allows you to store a larger amount of data with minimal impact on response time.
For example, if only 60 GB out of your 300 GB of data is actively used, you can move the rest of the data to disk instead of keeping the entire amount in RAM.
Learn more about data tiering.