Valkey™ settings
For a Yandex Managed Service for Valkey™ cluster, you can set Valkey™ settings.
The label next to the setting name shows which interface can be used to configure this setting: the management console, CLI, API, or Terraform. The All interfaces label means you can use any of the above interfaces.
Depending on the interface you select, the same setting may look differently. For example, Maxmemory policy in the management console is the same as:
maxmemory_policyin the gRPC API and TerraformmaxmemoryPolicyin the REST API
DBMS settings
The following settings are available:
-
Activedefrag
Management consoleCLIAPIThis setting enables active memory defragmentation in the cluster. It helps reduce memory fragmentation, which can cause low-memory issues. We do not recommend enabling it if you do not have memory fragmentation issues.
This setting is disabled by default.
For more information, see this Valkey™ guide
. -
Client output buffer limit normal
All interfacesLimit on the output buffer size for regular clients.
Valkey™ uses an output buffer to temporarily store сommand-generated data before it reaches the client. If the client is sending new commands faster than Valkey™ can process pending ones, the buffer size increases.
This setting includes the following parameters:
- Hard limit: Hard buffer size limit, in bytes. If this limit is crossed, the client connection terminates immediately. The minimum value is
0, i.e., there is no limit. The default value is0. To define the units of measurement in the management console, use the Hard limit unit setting. - Soft limit: Soft buffer size limit, in bytes. The client connection terminates only if this limit is exceeded for the period specified in the Soft seconds setting. The minimum value is
0, i.e., there is no limit. The default value is0. To define the units of measurement in the management console, use the Soft limit unit setting. - Soft seconds: Time (in seconds) during which the soft buffer limit may be exceeded. The minimum value is
0. The default value is0.
For more information about this setting, see this Valkey™ guide
. - Hard limit: Hard buffer size limit, in bytes. If this limit is crossed, the client connection terminates immediately. The minimum value is
-
Client output buffer limit pubsub
All interfacesLimit on the output buffer size for clients using the Pub/Sub
pattern.Valkey™ uses an output buffer to temporarily store сommand-generated data before it reaches the client. If the client is sending new commands faster than Valkey™ can process pending ones, the buffer size increases.
This setting includes the following parameters:
- Hard limit: Hard buffer size limit, in bytes. If this limit is crossed, the client connection terminates immediately. The minimum value is
0, i.e., there is no limit. The default value is33554432(32 MB). To define the units of measurement in the management console, use the Hard limit unit setting. - Soft limit: Soft buffer size limit, in bytes. The client connection terminates only if this limit is exceeded for the period specified in the Soft seconds setting. The minimum value is
0, i.e., there is no limit. The default value is8388608(8 MB). To define the units of measurement in the management console, use the Soft limit unit setting. - Soft seconds: Time (in seconds) during which the soft buffer limit may be exceeded. The minimum value is
0and the default is60.
For more about this setting, see this Valkey™ article
. - Hard limit: Hard buffer size limit, in bytes. If this limit is crossed, the client connection terminates immediately. The minimum value is
-
Databases
All interfacesNumber of databases.
Valkey™ uses logical databases isolated from one another. Operations with keys and values in one database do not affect data in other databases. Each database has a unique number, from
0toDatabases − 1.The valid values range from
1to2147483647. The default value is16.For more information, see this Valkey™ guide
.Warning
Updating this parameter will restart all running Valkey™ nodes.
-
Lua time limit
Management consoleCLIAPIMaximum Lua script execution time, in milliseconds.
The valid values range from
0to5000. The default value is5000. If0, execution time is unlimited.Changes do not affect an already running script.
For more information, see this Valkey™ article
. -
Maxmemory percent
All interfacesMaximum percentage of RAM to allocate for user data on Yandex Managed Service for Valkey™ cluster hosts.
The valid values range from
1to75. The default value is75.Note
Reducing the maximum percentage decreases the database capacity. This may be helpful if the database experiences OOM Killer issues.
-
Maxmemory policy
All interfacesMemory management mode when low on memory.
volatile-lru: Delete keys with expired TTL starting with the least recently used (LRU) one.volatile-lfu: Delete keys with expired TTL starting with the least frequently used (LFU) one.volatile-ttl: Delete keys with expired TTL starting with the shortest TTL one.volatile-random: Delete keys with expired TTL in random order.allkeys-lru: Delete keys regardless of their TTL starting with the least recently used one.allkeys-lfu: Delete keys regardless of their TTL starting with the least frequently used one.allkeys-random: Delete keys regardless of their TTL in any order.noeviction: Do not delete keys and return an error if there is not enough memory to insert data. This is the default setting.
For more information, see this Valkey™ guide
. -
Notify keyspace events
All interfacesKeyspace event notification setting.
The setting value is a string of modifiers that manage notification behavior. The default value is an empty string, i.e., notification is disabled.
For a complete list of modifiers, see this Valkey™ article
. -
Slowlog log slower than
All interfacesCommands running longer than the specified time (in microseconds) are considered slow. Such commands end up in the slow log. If the value is
0, all executed commands are logged.The valid values range from
-1(no slow logging) to9223372036854775807. The default value is10000.For more information, see this Valkey™ guide
. -
Slowlog max len
All interfacesMaximum number of entries in the slow log. When the log reaches this limit, the oldest entries are removed before adding new ones.
The valid values range from
0(no slow logging) to9223372036854775807. The default value is1000.For more information, see this Valkey™ guide
. -
Timeout
All interfacesTime (in seconds) during which connections to inactive clients remain open.
The valid values range from
0(connections stay open) to2147483647.For more information, see this Valkey™ guide
.