You can fine-tune and customize parameters for your Tair (Redis OSS-compatible) instances based on your business scenarios to improve the performance and security of the instances. This topic describes the parameters supported in different engine versions and architectures.
Precautions
If the
Parameter is not supported for current version
error is returned when you configure parameters, update the minor version of your instance. For more information, see Update the minor version of an instance.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 Configure parameters.
This topic describes only the parameters for Redis Open-Source Edition instances. For information about the parameters for Tair (Enterprise Edition) instances, including memory-optimized, persistent memory-optimized, and ESSD/SSD-based instances, see Parameters that can be configured for Tair (Enterprise Edition) instances.
Parameters
The following section describes the symbols used in the tables of this topic:
The ✔️ symbol indicates that the major version or instance architecture supports the parameter.
The ❌ symbol indicates that the major version or instance architecture does not support the parameter.
Only specific parameters can be configured to ensure instance stability. Parameters not described in this topic cannot be configured.
For more information about instance 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 | Redis 2.8 | ||
#no_loose_check-whitelist-always | Specifies whether to check that the IP address of a client is added to a whitelist of the instance after password-free access is enabled for the instance. The client is deployed in the same virtual private cloud (VPC) as the instance. Valid values:
Note This parameter is available only for classic instances. | ❌ | ❌ | 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 | Specifies whether to allow password-free execution of Sentinel commands when the Sentinel mode is enabled. Valid values:
| Standard️️✔️ Cluster✔️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️ Read/write splitting✔️ | ❌ | ❌ | ❌ |
#no_loose_sentinel-password-free-commands | After you enable the Sentinel mode and set the #no_loose_sentinel-password-free-access parameter to yes, you can use this parameter to specify an additional list of commands that can be run without requiring a password. By default, this parameter is empty. Important
| Standard️️✔️ Cluster✔️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️ Read/write splitting✔️ | ❌ | ❌ | ❌ |
#no_loose_tls-min-version | The earliest Transport Layer Security (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 | Specifies whether to enable AOF persistence for master nodes. 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 specifies the output buffer limits for publish/subscribe clients. Default value: 33554432 8388608 60. normal specifies the output buffer limits of normal clients. Default value: 524288000 0 0. The parameter value is specified in the following 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 | Specifies whether to enable dynamic frequency control for background tasks. Valid values:
| Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️ Read/write splitting✔️ | ❌ | ❌ |
| The maximum number and size of key-value pairs stored in a hash. Ziplist encoding is used only if a hash meets both of the following conditions:
| ❌ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ |
| Starting from Redis 7.0, listpack is used as the default hash encoding method. Listpack encoding is used only if a hash meets both of the following conditions:
| Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | ❌ | ❌ | ❌ | ❌ |
hz | Specifies how frequently tasks are performed in the background. For example, you can specify how frequently tasks are performed to evict expired keys. Valid values: 1 to 500. The default value is 10, which specifies that each task is performed 10 times per second. Note A larger value results in higher CPU consumption but allows the system to delete expired keys more frequently and close timed-out connections more precisely. We recommend that you specify a value less than or equal to 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 | Specifies whether to enable tracking of per-command latencies. Valid values:
Note This parameter is available only for Redis 7.0 and later. | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | ❌ | ❌ | ❌ | ❌ |
lazyfree-lazy-eviction | Specifies whether to enable the eviction feature based on the lazyfree mechanism. 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 | Specifies whether to delete expired keys based on the lazyfree mechanism. 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 the DEL command asynchronously deletes data based on the lazyfree mechanism. 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 to asynchronously delete data based on the lazyfree mechanism when a user runs the DEL command. Valid values:
| Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | ❌ | ❌ | ❌ |
lazyfree-lazy-user-flush | Specifies whether the FLUSHDB, FLUSHALL, SCRIPT FLUSH, and FUNCTION FLUSH commands are automatically converted to Lazyfree 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 nodes that are not compressed at both ends of a list. Valid values: 0 to 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 | Only instances that are compatible with Redis 2.8 support these parameters. Ziplist encoding is used only if a list meets both of the following conditions:
| ❌ | ❌ | ❌ | ❌ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ |
list-max-ziplist-value | ||||||
| For versions compatible with Redis 6.0 and earlier, the default encoding method for lists is ziplist (the list-max-ziplist-size parameter), whereas for versions compatible with Redis 7.0 and later, the default is listpack (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 policy used to evict keys if memory is exhausted. If the memory usage of your instance reaches the value of Maxmemory, data eviction is triggered. You can choose a data eviction policy based on your needs. 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 | The Eviction factor that is used to set the latency of each data eviction. Valid values: 0 to 100. Default value: 10.
Note This parameter is available only for Redis 7.0. | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | ❌ | ❌ | ❌ | ❌ |
active-expire-effort | The Expire factor that is used to set the latency of each deletion of expired keys. Valid values: 1 to 10. Default value: 1. The larger the value, the faster expired keys are deleted and the more CPU resources are used. | 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 | Specifies the maximum number of data entries for which a set supports intset encoding. A set uses intset encoding when 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✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ |
slowlog-log-slower-than | The threshold for logging slow queries. When an operation is executed for a period of time that exceeds the specified threshold, the operation is logged. Unit: microseconds (μs). Default value: 20000 (20 milliseconds). Valid values: 10000 to 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 | The maximum number of entries that can be stored in a slow query log. Valid values: 100 to 10000. Default value: 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 | The maximum amount of memory that each macro node in a stream can consume. Valid values: 0 to 999,999,999,999,999. Note A value of 0 indicates no limit. | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️ Read/write splitting✔️ | ❌ | ❌ |
stream-node-max-entries | Specifies the maximum number of entries that can be stored on each macro node in a stream. Valid values: 0 to 999,999,999,999,999. Note A value of 0 indicates no limit. | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️ Read/write splitting✔️ | ❌ | ❌ |
tracking-table-max-keys | The maximum number of keys that can be stored in the tracking table. Valid values: 0 to 1000000000. Default value: 1000000. Note This parameter is available only for Redis 7.0. | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | ❌ | ❌ | ❌ | ❌ |
timeout | The timeout period. The system closes a connection to a client for the instance if the connection remains idle for the specified period of time. Valid values: 0 to 100000. Unit: seconds. The default value is 0, which indicates that no timeout period is specified. | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | ❌ |
| The maximum number and size of key-value pairs stored in a sorted set. Ziplist encoding is used only if a sorted set meets both of the following conditions:
| ❌ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ |
| Starting from Redis 7.0, listpack is used as the default sorted set encoding method. Listpack encoding is used only if a sorted set meets both of the following conditions:
| Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | ❌ | ❌ | ❌ | ❌ |
bigkey-threshold | The threshold for the number of elements in a large key (a key with many elements) for Top Key statistics. Default value: 2000. Valid values: 500 to 100000. Note If this parameter is not displayed, update the minor version and retry. | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | Standard️️✔️ Cluster✔️️️️️ Read/write splitting✔️ | ❌ | ❌ |
Proxy node parameters
The parameters provided by proxy nodes are supported only by cluster instances in 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 | Specifies whether to enable the switch between RESP2 and RESP3 protocols by using the HELLO command. Valid values:
Note This parameter is available only for proxy nodes whose minor version is 7.0.9 or later. |
max_session_processing | The maximum number of pending requests allowed for a single connection. Valid values: 10 to 10000000. Default value: 1000. If a proxy node forwards requests from a client to a data node but does not receive a response from the data node, these requests are pending. This parameter is used to prevent pending requests that are caused by capability differences between the frontend and backend of proxy nodes. This prevents an increase in memory usage. |
| These parameters are part of the observability feature and take effect only after you enable the Audit Log feature. Statistics are collected at an interval of 5 seconds.
Note
|
ptod_enabled | Specifies whether to pass the client IP address to the data node. Valid values:
|
readonly_lua_route_ronode_enable | Specifies whether to enable the Lua execution mode for read-only replicas. Valid values:
|
read_request_only_ronode_whenrwsplit_enable | Specifies whether to enable directed forwarding of requests from read-only accounts. Valid values:
|
rt_threshold_ms | The threshold for slow logs in proxy nodes. Unit: milliseconds (ms). Valid values: 30 to 2000. Default value: 500. Note If the time that elapses from when a proxy node sends a request to a data node to when the proxy node receives a response exceeds the threshold, a slow log is generated. |
script_check_enable | Specifies whether to enable or disable checks for Lua scripts on proxy nodes. For details about the check items, see Proxy check items for Lua. 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 | Specifies whether to enable the feature that converts SUBSCRIBE to PSUBSCRIBE. Valid values:
|