Valkey™ settings
For Yandex Managed Service for Valkey™ clusters, you can configure 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 that all of the above interfaces are supported.
Depending on the selected interface, the same setting may look differently. For example, Maxmemory policy in the management console means:
maxmemory_policy
in the gRPC API and Terraform.maxmemoryPolicy
in the REST API.
DBMS settings
You can use the following settings:
-
Client output buffer limit normal
All interfaces
Setting a limit on the output buffer for regular clients.
Valkey™ uses an output buffer to store data generated by a query before sending it out to a client. If a client is sending new queries faster than Valkey™ can process pending ones, this causes the buffer to grow.
This setting includes the following parameters:
- Hard limit: Hard buffer size limit (in bytes). If this value is exceeded, the connection with the client will terminate immediately. The minimum value is
0
(no limit). The default value is0
. In the management console, define units of measurement using the Hard limit unit parameter. - Soft limit: Soft buffer size limit (in bytes). The connection to the client will not terminate unless this value is exceeded for a period of time specified in the Soft seconds parameter. The minimum value is
0
(no limit). The default value is0
. In the management console, define units of measurement using the Soft limit unit parameter. - Soft seconds: Time (seconds) for which the soft buffer limit may be exceeded. The minimum value is
0
. The default value is0
.
For more information about this setting, see the Valkey™ documentation
. - Hard limit: Hard buffer size limit (in bytes). If this value is exceeded, the connection with the client will terminate immediately. The minimum value is
-
Client output buffer limit pubsub
All interfaces
This limits the output buffer size for clients using the Pub/Sub
pattern.Valkey™ uses an output buffer to store data generated by a query before sending it out to a client. If a client is sending new queries faster than Valkey™ can process pending ones, this causes the buffer to grow.
This setting includes the following parameters:
- Hard limit: Hard buffer size limit (in bytes). If this value is exceeded, the connection with the client will terminate immediately. The minimum value is
0
(no limit). The default value is33554432
(32 MB). In the management console, define units of measurement using the Hard limit unit parameter. - Soft limit: Soft buffer size limit (in bytes). The connection to the client will not terminate unless this value is exceeded for a period of time specified in the Soft seconds parameter. The minimum value is
0
(no limit). The default value is8388608
(8 MB). In the management console, define units of measurement using the Soft limit unit parameter. - Soft seconds: Time (seconds) for which soft buffer limit may be exceeded. The minimum value is
0
, while the default one is60
.
For more information about this setting, see the Valkey™ documentation
. - Hard limit: Hard buffer size limit (in bytes). If this value is exceeded, the connection with the client will terminate immediately. The minimum value is
-
Databases
All interfaces
Number of databases.
Valkey™ uses the concept of logical databases isolated from one another. Operations with keys and values in one database do not affect data in other databases. Each database is identified by its own number (from
0
toDatabases − 1
).The minimum value is
1
, the maximum one is2147483647
, and the default one is16
.For more information, see the Valkey™ documentation
.Warning
If you change this parameter, all running Valkey™ nodes will be restarted.
-
Maxmemory percent
All interfaces
Maximum percentage of RAM to allocate for user data on Yandex Managed Service for Valkey™ cluster hosts.
The minimum value is 1 and the maximum value is 75. The default value is 75.
Note
Decreasing the maximum percentage value will reduce the database capacity. This may be helpful if the database has Out of Memory Killer (OOM Killer) issues.
-
Maxmemory policy
All interfaces
This defines the memory management mode when there is not enough memory.
volatile-lru
: Delete keys whose TTL has expired, starting with the least recently used (LRU) key.volatile-lfu
: Delete expired keys, starting with the least frequently used (LFU) key.volatile-ttl
: Delete expired keys, starting with the key with the lowest TTL.volatile-random
: Delete expired keys 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 in any order regardless of their TTL.noeviction
(default): Do not delete keys. Return an error if there is not enough memory to insert the data.
For more information, see the Valkey™ documentation
. -
Notify keyspace events
All interfaces
This setting configures notifications about keyspace events.
Its value is a string with modifiers that manage notification output. The default value is an empty string (notification output is disabled).
For a complete list of modifiers, see the Valkey™ documentation
. -
Slowlog log slower than
All interfaces
Queries that run longer than the specified time (in microseconds) are considered slow. These queries are logged to the slow log. If the value is
0
, all queries being run are logged there.The minimum value is
-1
(there is no slow log), the maximum one is9223372036854775807
, and the default one is10000
.For more information, see the Valkey™ documentation
. -
Slowlog max len
All interfaces
Maximum number of entries in the slow query log. When the log is at its maximum length, before inserting new entries, the oldest ones will be removed.
The minimum value is
0
(there is no slow log), the maximum one is9223372036854775807
, and the default one is1000
.For more information, see the Valkey™ documentation
. -
Timeout
All interfaces
The time (in seconds) during which a connection to an inactive client is maintained.
The minimum and default value is
0
(connections are not terminated), while the maximum one is2147483647
.For more information, see the Valkey™ documentation
.