Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Managed Service for Valkey™
  • Getting started
    • Resource relationships
    • Networking in Yandex Managed Service for Valkey™
    • Sharding
    • Backups
    • Replication and fault tolerance
    • Supported clients
    • Memory management
    • Available commands
    • Quotas and limits
    • Disk types
    • Maintenance
    • Valkey™ settings
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Public materials
  • Release notes
  • FAQ

In this article:

  • Improving the performance and stability of the Valkey™ process
  • Backup stability
  1. Concepts
  2. Memory management

Memory management in Yandex Managed Service for Valkey™

Written by
Yandex Cloud
Updated at January 29, 2025
  • Improving the performance and stability of the Valkey™ process
  • Backup stability

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:

  • Improve the Valkey™ process performance and stability.
  • Ensure backup stability.

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. The Valkey™ process leverages it to minimize the number of swap file accesses. This increases performance and ensures stable operation of the Valkey™ process, for example, during replication and backups.

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 mechanism: if a shared memory page is modified, its copy is created, and the changes are written into that copy. So if you write to the cluster while a backup is being created, the updated and new data are going to take up extra RAM space. Therefore, intense writing may deplete host memory even with reserved RAM available. In which case the host's operating system will terminate the Valkey™ processes citing out of memory. Valkey™ will become unavailable on this host, and the replication and backup operations will be interrupted. To avoid this:

  • Make sure to start backups when the cluster load is minimum.
  • Increase the amount of RAM by upgrading the host class.

Was the article helpful?

Previous
Supported clients
Next
Available commands
Yandex project
© 2025 Yandex.Cloud LLC