You can fine-tune and customize parameters for your Tair (Redis OSS-compatible) instances based on your business scenario to improve instance performance and security. Different engine versions and architectures support different parameters. This topic describes each parameter in detail.
Precautions
-
If the
Parameter is not supported for current versionerror is returned when you configure parameters, update the minor version of your instance. For more information, see Upgrade minor and proxy versions. -
After you submit the modifications for specific parameters, your instance is automatically restarted. During the restart, the instance encounters transient connections that last for a few seconds. On the page for modifying parameters, the Restart and Take Effect column indicates whether the instance must be restarted for the modifications to take effect. For more information, see Set parameters.
This topic covers only parameters for Redis Open-Source Edition instances. For parameters related to Tair (Enterprise Edition) instances, such as memory-optimized, persistent memory-optimized, and disk-based instances, see Configuration parameter list for Tair Enterprise Edition.
Supported parameters and descriptions
To improve readability and clarity, this topic uses the following annotations in tables:
✔️ indicates that the parameter is supported in the specified major version or architecture.
❌ indicates that the parameter is not supported in the specified major version or architecture.
To ensure maximum instance stability, only a subset of parameters can be configured. If a parameter is not listed in this topic, you cannot configure it.
For detailed descriptions of architectures, see Standard architecture, Cluster architecture, and Read/write splitting architecture.
Database kernel parameters
Parameter | Description | Instance major version and architecture | ||||
Version 7.0 | Version 6.0 | Version 5.0 | Version 4.0 | Version 2.8 | ||
#no_loose_check-whitelist-always | Specifies whether to check if the client IP address is in the instance whitelist after you enable password-free access over a VPC. Valid values:
Note
| ❌ | ❌ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | ❌ |
#no_loose_disabled-commands | The disabled commands. You can use this parameter to disable the commands that may have high risks or high time complexity based on your business requirements, such as FLUSHALL, FLUSHDB, KEYS, HGETALL, EVAL, EVALSHA, and SCRIPT. Note
| Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ |
#no_loose_sentinel-enabled | Specifies whether to enable the Sentinel-compatible mode for standard instances or cluster instances in direct connection mode. Valid values:
| Standard ✔️ Cluster ✔️ Read/write splitting ❌ | Standard ✔️ Cluster ✔️ Read/write splitting ❌ | Standard ✔️ Cluster ✔️ Read/write splitting ❌ | Standard ✔️ Cluster ✔️ Read/write splitting ❌ | ❌ |
#no_loose_sentinel-password-free-access | When Sentinel mode is enabled, specifies whether to allow password-free execution of Sentinel-related commands. Valid values:
| Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | ❌ | ❌ | ❌ |
#no_loose_sentinel-password-free-commands | After enabling Sentinel mode and setting #no_loose_sentinel-password-free-access, use this parameter to specify additional commands that can be executed without a password (empty by default). Important
| Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | ❌ | ❌ | ❌ |
#no_loose_tls-min-version | Sets the minimum TLS version supported by the instance. Valid values:
| Standard ❌ Cluster ✔️ Read/write splitting ✔️ | Standard ❌ Cluster ✔️ Read/write splitting ✔️ | Standard ❌ Cluster ✔️ Read/write splitting ✔️ | Standard ❌ Cluster ✔️ Read/write splitting ✔️ | Standard ❌ Cluster ✔️ Read/write splitting ✔️ |
appendfsync | The frequency at which to perform the fsync operation for append-only file (AOF) persistence. The default value is everysec and cannot be changed. This parameter is available only if the appendonly parameter is set to yes. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
appendonly | Enables or disables AOF persistence for the primary node. Valid values:
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
| pubsub limits the output buffer for publish/subscribe clients. Default value: 33554432 8388608 60. normal limits the output buffer for regular clients. Default value: 524288000 0 0. Specify values in the format:
Important
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
dynamic-hz | Enables or disables dynamic background task frequency adjustment. Valid values:
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | ❌ | ❌ |
| For instances compatible with Redis 6.0 and earlier, ziplist is used as the default codec for hashes. A hash object uses ziplist encoding when both of the following conditions are met:
| ❌ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
| For instances compatible with Redis 7.0 and later, listpack is used as the default codec for hashes. A hash object uses listpack encoding when both of the following conditions are met:
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ | ❌ | ❌ |
hz | The execution frequency of instance background tasks, such as the task to clear expired keys. The range is [1-500]. The default is 10, which means 10 times per second. Note A higher value consumes more CPU resources but also results in a higher clearing frequency when there are many expired keys. It also allows the instance to handle timeouts more precisely. We recommend a value no greater than 100. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
latency-tracking | Enables or disables per-command latency tracking. Valid values:
Note This parameter is available only for Redis 7.0 and later. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ | ❌ | ❌ |
lazyfree-lazy-eviction | Enables or disables lazyfree-based eviction. Valid values:
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ |
lazyfree-lazy-expire | Enables or disables lazyfree-based deletion of expired keys. Valid values:
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ |
lazyfree-lazy-server-del | Specifies whether implicit DEL operations use lazyfree-based asynchronous deletion. Valid values:
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ |
lazyfree-lazy-user-del | Specifies whether explicit DEL commands use lazyfree-based asynchronous deletion. Valid values:
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ | ❌ |
lazyfree-lazy-user-flush | Automatically converts FLUSHDB, FLUSHALL, SCRIPT FLUSH, and FUNCTION FLUSH commands to lazyfree-based asynchronous deletion mode. Valid values:
Note This parameter is available only for Redis 7.0 and later. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ | ❌ | ❌ |
list-compress-depth | The number of uncompressed nodes at both ends of a list. The range is [0-65535].
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ |
list-max-ziplist-entries | These parameters apply only to Redis 2.8-compatible instances. Use ziplist encoding when both conditions are met:
| ❌ | ❌ | ❌ | ❌ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
list-max-ziplist-value | ||||||
| For instances compatible with Redis 6.0 and earlier, ziplist is the default codec for lists (the list-max-ziplist-size parameter). For instances compatible with Redis 7.0 and later, listpack is the default codec for lists (the list-max-listpack-size parameter).
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ |
maxmemory-policy | The data eviction policy. When an instance runs out of memory and its usage reaches Maxmemory, data eviction is triggered. You can choose different data eviction policies. Valid values: Note
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
maxmemory-eviction-tenacity | Eviction tenacity factor. Controls latency per eviction cycle. Valid values: [0–100]. Default: 10.
Note This parameter is available only for Redis 7.0. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ | ❌ | ❌ |
active-expire-effort | Expired key deletion effort factor. Controls latency per expired key deletion cycle. Valid values: [1–10]. Default: 1. Higher values delete expired keys faster but consume more CPU. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ | ❌ |
notify-keyspace-events | The types of events of which the server can notify clients. The value of this parameter is a combination of the following characters. This parameter setting applies to all databases in the instance. These notifications consume CPU resources. For more information, see Redis keyspace notifications.
Important
The specified value must include at least K or E. Otherwise, no notifications are sent. For example, if you want to be notified of expiration events, set this parameter to | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
set-max-intset-entries | Use intset encoding for sets that meet both conditions:
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
slowlog-log-slower-than | Slow query log threshold. Commands taking longer than this value are logged. Unit: microseconds (μs). Default: 20000 (20 ms). Valid values: 10000–10000000. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
slowlog-max-len | Maximum number of entries stored in the slow query log. Valid values: 100–10000. Default: 1024. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
stream-node-max-bytes | Maximum memory (in bytes) per macro node in a stream. Valid values: 0–999,999,999,999,999. Note A value of 0 means unlimited. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | ❌ | ❌ |
stream-node-max-entries | Maximum number of entries per macro node in a stream. Valid values: 0–999,999,999,999,999. Note A value of 0 means unlimited. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️ Read/write splitting ✔️ | ❌ | ❌ |
tracking-table-max-keys | Maximum number of keys stored in the tracking table. Valid values: [0–1000000000]. Default: 1000000. Note This parameter is available only for Redis 7.0. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ | ❌ | ❌ |
timeout | When a client's idle time reaches the specified number of seconds, the instance closes the connection. The unit is seconds. The range is [0,100000]. The default is 0, which means no connections are disconnected. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ |
| For instances compatible with Redis 6.0 and earlier, ziplist is the default codec for Zsets. A Zset uses ziplist encoding when both of the following conditions are met:
| ❌ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ |
| For instances compatible with Redis 7.0 and later, listpack is the default codec for Zsets. A Zset uses listpack encoding when both of the following conditions are met:
| Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ | ❌ | ❌ |
bigkey-threshold | Threshold (in element count) for identifying big keys in Top Key statistics. Default: 2000. Valid values: [500–100000]. Note If this parameter does not appear in your settings, upgrade the minor version and try again. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ |
| The statistics threshold for hot keys (by QPS) in Top Key Statistics. The default is 5000. The range is [100-100000]. Note This parameter requires minor version 7.0.1.8, 6.0.2.9, 5.5.2.9, or later. | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | Standard ✔️ Cluster ✔️️️️️ Read/write splitting ✔️ | ❌ | ❌ |
Proxy node parameters
Proxy node parameters are available only for cluster instances that use proxy mode and read/write splitting instances.
Parameter | Description |
cluster_compat_enable | Specifies whether to enable compatibility with native Redis cluster syntax. Valid values:
|
hello_enabled | The switch to toggle between RESP2 and RESP3 protocols using the HELLO command. Valid values:
Note This parameter is supported only for Proxy 7.0.9 and later. |
max_session_processing | The maximum number of requests that can be stacked for a single connection. The range is [10-10000000]. The default is 1000. A request is in a stacked state if the proxy node forwards the client's request to a data node but does not receive a reply from the data node. This parameter is mainly used to limit request stacking caused by differences in processing capabilities between the proxy node's frontend and backend, preventing memory increases. |
| These parameters are part of observability features. After configuration, you must also enable audit logs for them to take effect. Statistics are collected every 5 seconds.
Note
|
ptod_enabled | Specifies whether to pass the client's IP address through to the data node. Valid values:
|
readonly_lua_route_ronode_enable | Enables or disables the Lua execution mode for read replicas. Valid values:
|
read_request_only_ronode_whenrwsplit_enable | Enables or disables directional forwarding for requests from read-only accounts. Valid values:
|
rt_threshold_ms | The slow query log threshold for the proxy node. The unit is milliseconds (ms). The range is [30-2000]. The default is 500. If the time from when a request is sent from the proxy node to a data node until the proxy node receives the response exceeds this threshold, a slow query log entry is generated. |
script_check_enable | Enables or disables the proxy node's check for Lua scripts. For more information about the check items, see Proxy checks for Lua scripts. Valid values:
|
sentinel_compat_enable | Specifies whether to enable the Sentinel-compatible mode for cluster instances in proxy mode or read/write splitting instances. Valid values:
|
transfer_subscrible_to_psubscrible_enable | Enables or disables the feature that converts SUBSCRIBE to PSUBSCRIBE. Valid values:
|