Apsaradb for Redis allows you to customize some instance parameters. This topic describes the parameters of different engine versions and the common way to configure these parameter in the Apsaradb for Redis console.

Redis 5.0 custom parameters

Parameter Description Standard Edition Cluster Edition Read/Write Splitting Zone-disaster recovery instance
#no_loose_audit-read-enabled Enable or disable read request audit. After audit, the read request is displayed in the log. Not supported Supported Supported Supported (except standard edition)
#no_loose_check-whitelist-always Specifies whether to verify that the client IP address is in a whitelist of the ApsaraDB for Redis instance if password-free access is enabled in a Virtual Private Cloud (VPC) network. Default value: no. If you set this parameter to yes, the whitelist still takes effect for password-free access over a VPC network. Valid values:
  • yes: specifies that the system checks whether a client IP address is in a whitelist.
  • no: disables the compatibility with the Sentinel mode. This is the default value.
Supported Supported Supported Supported
#no_loose_disabled-commands

Specifies the commands that you want to disable, including FLUSHALL, FLUSHDB, KEYS, HGETALL, EVAL, EVALSHA, and SCRIPT.

Supported Supported Supported Supported
#no_loose_ssl-enabled Specifies whether to enable SSL-based connections. Valid values:
  • yes: enables SSL-based connections.
  • no: disables the compatibility with the Sentinel mode. This is the default value.
Not supported Supported Supported Unsupported
#no_loose_sentinel-enabled Specifies whether to enable the compatibility with the Sentinel mode. Valid values:
  • yes: enables the compatibility with the Sentinel mode.
  • no: disables the compatibility with the Sentinel mode. This is the default value.
Supported Supported Supported Supported
appendonly Specifies whether to enable append-only file (AOF) persistence. Valid values:
  • yes: enables AOF persistence. This is the default value.
  • no: disables AOF persistence.
Note If you set this parameter to no, AOF persistence is disabled on the master node and remains functional on the replica node.
Supported Supported Supported Supported
client-output-buffer-limit pubsub Specifies output buffer limits of publisher and subscriber clients. The clients are disconnected when the specified limits are reached. Set this parameter in this format: <hard limit> <soft limit> <soft seconds>.
  • hard limit: disconnects a client if the output buffer of the client is larger than or equal to the value specified by the hard limit field. Unit: bytes.
  • soft limit and soft seconds: disconnects a client if the output buffer of the client is larger than or equal to the value specified by the soft limit field and if this situation lasts for a period longer than or equal to the value specified by the soft seconds field. The soft limit value is measured in bytes, and the soft seconds value is measured in seconds.
Supported Supported Supported Supported
dynamic-hz Specifies whether to enable a dynamic hz value. Valid values:
  • yes: enables a dynamic hz value. This is the default value.
  • no: disables a dynamic hz value.
Supported Not Provided Not supported Supported
hash-max-ziplist-entries

The upper limit of the number of bytes in each key-value pair stored in a hash to support ziplist encoding. The ziplist data structure is used only if both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the hash is less than the value of the hash-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the hash is less than the value of the hash-max-ziplist-entries parameter.
Supported Supported Supported Supported
hash-max-ziplist-value

The upper limit of the number of bytes in each key-value pair stored in a hash to support ziplist encoding. The ziplist data structure is used only if both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the hash is less than the value of the hash-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the hash is less than the value of the hash-max-ziplist-entries parameter.
Supported Supported Supported Supported
hz Specifies the frequency at which Redis background tasks are performed. For example, to evict expired keys, you can specify a value from 1 to 500 as the task frequency. The default value is 10. A higher value results in higher CPU consumption but allows the system to delete expired keys and terminate timeout connections more frequently. We recommend that you do not specify a value larger than 100. Supported Supported Supported Supported
lazyfree-lazy-eviction Specifies whether to use Lazyfree to evict data. Valid values:
  • yes: enables Lazyfree to evict data.
  • no: disables Lazyfree to evict data. This is the default value.
Supported Supported Supported Supported
lazyfree-lazy-expire Specifies whether to use Lazyfree to delete expired keys. Valid values:
  • yes: enables Lazyfree to delete expired keys. This is the default value.
  • no: disables asynchronous deletion.
Supported Supported Supported Supported
lazyfree-lazy-server-del Specifies whether to run the DEL command and asynchronously delete data based on Lazyfree.
  • yes: enables asynchronous deletion. This is the default value.
  • no: disables asynchronous deletion.
Supported Supported Supported Supported
list-compress-depth

Specifies the number of entries that are not compressed at both ends of a list. Value range: 0 to 65535.

  • 0: specifies that no node of the list is compressed. This is the default value.
  • 1: specifies that the first node from each side of the list is not compressed, but all nodes between these two nodes are compressed.
  • 2: specifies that the first two nodes from each side of the list are not compressed, but all nodes between these four nodes are compressed.
  • 3: specifies that the first three nodes from each side of the list are not compressed, but all nodes between these six nodes are compressed.
  • Other values specify similar rules.
Supported Supported Supported Supported
list-max-ziplist-size
  • The maximum length of a ziplist in a quicklist. A positive value specifies the maximum number of elements in each ziplist of a quicklist. For example, if you set this parameter to 5, each ziplist of a quicklist can contain a maximum of five elements.
  • A negative number indicates the maximum number of bytes in each ziplist of a quicklist. Valid values: [-5, -1], where:
    • -5: specifies that each ziplist of a quicklist cannot exceed 64 KB (1 KB = 1,024 bytes).
    • -4: specifies that each ziplist of a quicklist cannot exceed 32 KB.
    • -3: specifies that each ziplist of a quicklist cannot exceed 16 KB.
    • -2: specifies that each ziplist of a quicklist cannot exceed 8 KB. This is the default value.
    • -1: specifies that each ziplist of a quicklist cannot exceed 4 KB.
Supported Supported Supported Supported
maxmemory-policy

Specifies the policy used to evict data when the system runs out of memory. Valid values:

  • volatile-lru: evicts the approximated least recently used (LRU) keys among keys that have time-to-live (TTL) values configured.
  • allkeys-lru: evicts the approximated LRU keys.
  • volatile-lfu: evicts the approximated least frequently used (LFU) keys among keys that have TTL values configured.
  • allkeys-lfu: evicts the approximated LFU keys.
  • volatile-random: evicts random keys among keys that have TTL values configured.
  • allkeys-random: evicts random keys.
  • volatile-ttl: evicts keys with the minimum TTL. The LRU, LFU, and volatile-ttl policies use approximated randomized algorithms.
  • noeviction: specifies that the system does not evict any keys, but returns an error for write operations.
Supported Supported Supported Supported
notify-keyspace-events

The types of events of which the Redis server can notify clients. The value of this parameter is any combination of the following characters,

  • each of which specifies a type of event:
  • K: the keyspace events, published with the __keyspace@<db>__ prefix.
  • E: the key events, published with the __keyevent@<db>__ prefix.
  • g: the generic commands that are non-type specific, such as DEL, EXPIRE, and RENAME.
  • l: the list commands.
  • s: the set commands.
  • h: the hash commands.
  • z: the sorted set commands.
  • x: the expired events. An expired event is generated when an expired key is deleted.
  • e: the eviction events. An eviction event is generated when a key is deleted due to the policy specified by the maxmemory-policy parameter.
  • A: the alias for g$lshzxe.
Supported Not Provided Not supported Supported
set-max-intset-entries

The maximum number of data entries in a set to support inset encoding. A set uses inset encoding when both of the following conditions are met:

  1. The number of entries in the set is less than or equal to the value of the set-max-intset-entries parameter.
  2. The set only contains radix-10 integers in the range of 64-bit signed integers.
Supported Supported Supported Supported
slowlog-log-slower-than Specifies whether to log slow queries.
  • Negative value: does not log slow queries.
  • 0: logs all queries.
  • Positive value: logs queries of which the duration exceeded the specified value.

Value range: 0 to 10000000. Default value: 10000. Unit: microseconds.

Supported Supported Supported Supported
slowlog-max-len The maximum number of slow query logs that can be stored. Value range: 100 to 10000. Default value: 1024. Supported Supported Supported Supported
stream-node-max-bytes The maximum amount of memory in bytes that each macro node in a stream can consume. Value range: 0 to 999999999999999. Unit: bytes. A value of 0 means that the amount of consumed memory is not limited. Supported Not Provided Not supported Supported
stream-node-max-entries The maximum number of entries stored on each macro node in a stream. Value range: 0 to 999999999999999. A value of 0 means that the number of entries on each node is not limited. Supported Not Provided Not supported Supported
timeout Specifies a timeout period. The system terminates a connection to a client if the client has been idle for the specified timeout period. Value range: 0 to 100000. Unit: seconds. A value of 0 means that no timeout period is specified for connections. Supported Not Provided Not supported Supported
zset-max-ziplist-entries

The upper limit of the number of key-value pairs stored in a sorted set to support ziplist encoding. A sorted set uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the sorted set is less than the value of the zset-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the sorted set is less than the value of the zset-max-ziplist-entries parameter.
Supported Supported Supported Supported
zset-max-ziplist-value

The upper limit of the number of bytes in each key-value pair stored in a sorted set to support ziplist encoding. A sorted set uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the sorted set is less than the value of the zset-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the sorted set is less than the value of the zset-max-ziplist-entries parameter.
Supported Supported Supported Supported
list-max-ziplist-entries

The upper limit of the number of bytes in each element stored in a list to support ziplist encoding. A list uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each element stored in the list is less than the value of the list-max-ziplist-value parameter.
  2. The number of elements stored in the list is less than the value of the list-max-ziplist-entries parameter.
Not Provided Not Provided Not Provided Not supported
list-max-ziplist-value

The upper limit of the number of bytes in each element stored in a list to support ziplist encoding. A list uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each element stored in the list is less than the value of the list-max-ziplist-value parameter.
  2. The number of elements stored in the list is less than the value of the list-max-ziplist-entries parameter.
Not Provided Not Provided Not Provided Not supported
cluster_compat_enable Specifies whether to enable the compatibility with the native Redis cluster syntax. Valid values:
  • 0: disables the compatibility with the native Redis cluster syntax.
  • 1: enables the compatibility with the native Redis cluster syntax. This is the default value.
Not supported Supported Supported Unsupported
script_check_enable Specifies whether to verify that the keys used in Lua scripts are mapped to the same slot. Valid values:
  • 0: does not check whether the keys are mapped to the same slot.
  • 1: checks whether the keys are mapped to the same slot. This is the default value.
Not supported Supported Supported Unsupported
readonly_lua_route_ronode_enable The Lua execution mode of the read-only replica. Valid values:
  • 0: the default value indicates that the Lua execution mode is disabled. Read-only replicas do not support Lua, and the Lua command is processed by the primary node.
  • 1: indicating that the Lua execution mode is enabled. Lua that only includes read operations will be forwarded to the read-only replica.
Not Provided Not supported Supported Unsupported
transfer_subscrible_to_psubscrible_enable Enables or disables the function that turns SUBSCRIBE requests to PSUBSCRIBE requests. Valid values:
  • 0: the default value, indicates that the function is disabled.
  • 1: indicates that this feature is enabled. Redis Proxy will SUBSCRIBE convert to PSUBSCRIBE processing. If you use the PUB/SUB commands in the Lua, you can enable the function when the channel to be subscribed cannot receive the notification.
Not supported Supported Supported Unsupported

For more information about the parameters, see redis.conf for Redis 5.0.

Redis 4.0 custom parameters

Parameter Description Standard Edition Cluster Edition Read/Write Splitting Zone-disaster recovery instance
#no_loose_audit-read-enabled Enable or disable read request audit. After audit, the read request is displayed in the log. Not supported Supported Supported Supported (except Standard Edition)
#no_loose_check-whitelist-always Specifies whether to verify that the client IP address is in a whitelist of the ApsaraDB for Redis instance if password-free access is enabled in a Virtual Private Cloud (VPC) network. Default value: no. If you set this parameter to yes, the whitelist still takes effect for password-free access over a VPC network. Valid values:
  • yes: specifies that the system checks whether a client IP address is in a whitelist.
  • no: disables the compatibility with the Sentinel mode. This is the default value.
Supported Supported Supported Supported
#no_loose_disabled-commands

Specifies the commands that you want to disable, including FLUSHALL, FLUSHDB, KEYS, HGETALL, EVAL, EVALSHA, and SCRIPT.

Supported Supported Supported Supported
#no_loose_ssl-enabled Specifies whether to enable SSL-based connections. Valid values:
  • yes: enables SSL-based connections.
  • no: disables the compatibility with the Sentinel mode. This is the default value.
Not supported Supported Supported Unsupported
#no_loose_sentinel-enabled Specifies whether to enable the compatibility with the Sentinel mode. Valid values:
  • yes: enables the compatibility with the Sentinel mode.
  • no: disables the compatibility with the Sentinel mode. This is the default value.
Supported Supported Supported Supported
appendonly Specifies whether to enable append-only file (AOF) persistence. Valid values:
  • yes: enables AOF persistence. This is the default value.
  • no: disables AOF persistence.
Note If you set this parameter to no, AOF persistence is disabled on the master node and remains functional on the replica node.
Supported Supported Supported Supported
client-output-buffer-limit pubsub Specifies output buffer limits of publisher and subscriber clients. The clients are disconnected when the specified limits are reached. Set this parameter in this format: <hard limit> <soft limit> <soft seconds>.
  • hard limit: disconnects a client if the output buffer of the client is larger than or equal to the value specified by the hard limit field. Unit: bytes.
  • soft limit and soft seconds: disconnects a client if the output buffer of the client is larger than or equal to the value specified by the soft limit field and if this situation lasts for a period longer than or equal to the value specified by the soft seconds field. The soft limit value is measured in bytes, and the soft seconds value is measured in seconds.
Supported Supported Supported Supported
dynamic-hz Specifies whether to enable a dynamic hz value. Valid values:
  • yes: enables a dynamic hz value. This is the default value.
  • no: disables a dynamic hz value.
Not Provided Not Provided Not Provided Not supported
hash-max-ziplist-entries

The upper limit of the number of bytes in each key-value pair stored in a hash to support ziplist encoding. The ziplist data structure is used only if both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the hash is less than the value of the hash-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the hash is less than the value of the hash-max-ziplist-entries parameter.
Supported Supported Supported Supported
hash-max-ziplist-value

The upper limit of the number of bytes in each key-value pair stored in a hash to support ziplist encoding. The ziplist data structure is used only if both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the hash is less than the value of the hash-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the hash is less than the value of the hash-max-ziplist-entries parameter.
Supported Supported Supported Supported
hz Specifies the frequency at which Redis background tasks are performed. For example, to evict expired keys, you can specify a value from 1 to 500 as the task frequency. The default value is 10. A higher value results in higher CPU consumption but allows the system to delete expired keys and terminate timeout connections more frequently. We recommend that you do not specify a value larger than 100. Supported Supported Supported Supported
lazyfree-lazy-eviction Specifies whether to use Lazyfree to evict data. Valid values:
  • yes: enables Lazyfree to evict data.
  • no: disables Lazyfree to evict data. This is the default value.
Supported Supported Supported Supported
lazyfree-lazy-expire Specifies whether to use Lazyfree to delete expired keys. Valid values:
  • yes: enables Lazyfree to delete expired keys. This is the default value.
  • no: disables asynchronous deletion.
Supported Supported Supported Supported
lazyfree-lazy-server-del Specifies whether to run the DEL command and asynchronously delete data based on Lazyfree.
  • yes: enables asynchronous deletion. This is the default value.
  • no: disables asynchronous deletion.
Supported Supported Supported Supported
list-compress-depth

Specifies the number of entries that are not compressed at both ends of a list. Value range: 0 to 65535.

  • 0: specifies that no node of the list is compressed. This is the default value.
  • 1: specifies that the first node from each side of the list is not compressed, but all nodes between these two nodes are compressed.
  • 2: specifies that the first two nodes from each side of the list are not compressed, but all nodes between these four nodes are compressed.
  • 3: specifies that the first three nodes from each side of the list are not compressed, but all nodes between these six nodes are compressed.
  • Other values specify similar rules.
Supported Supported Supported Supported
list-max-ziplist-size
  • The maximum length of a ziplist in a quicklist. A positive value specifies the maximum number of elements in each ziplist of a quicklist. For example, if you set this parameter to 5, each ziplist of a quicklist can contain a maximum of five elements.
  • A negative number indicates the maximum number of bytes in each ziplist of a quicklist. Valid values: [-5, -1], where:
    • -5: specifies that each ziplist of a quicklist cannot exceed 64 KB (1 KB = 1,024 bytes).
    • -4: specifies that each ziplist of a quicklist cannot exceed 32 KB.
    • -3: specifies that each ziplist of a quicklist cannot exceed 16 KB.
    • -2: specifies that each ziplist of a quicklist cannot exceed 8 KB. This is the default value.
    • -1: specifies that each ziplist of a quicklist cannot exceed 4 KB.
Supported Supported Supported Supported
maxmemory-policy

Specifies the policy used to evict data when the system runs out of memory. Valid values:

  • volatile-lru: evicts the approximated least recently used (LRU) keys among keys that have time-to-live (TTL) values configured.
  • allkeys-lru: evicts the approximated LRU keys.
  • volatile-lfu: evicts the approximated least frequently used (LFU) keys among keys that have TTL values configured.
  • allkeys-lfu: evicts the approximated LFU keys.
  • volatile-random: evicts random keys among keys that have TTL values configured.
  • allkeys-random: evicts random keys.
  • volatile-ttl: evicts keys with the minimum TTL. The LRU, LFU, and volatile-ttl policies use approximated randomized algorithms.
  • noeviction: specifies that the system does not evict any keys, but returns an error for write operations.
Supported Supported Supported Supported
notify-keyspace-events

The types of events of which the Redis server can notify clients. The value of this parameter is any combination of the following characters,

  • each of which specifies a type of event:
  • K: the keyspace events, published with the __keyspace@<db>__ prefix.
  • E: the key events, published with the __keyevent@<db>__ prefix.
  • g: the generic commands that are non-type specific, such as DEL, EXPIRE, and RENAME.
  • l: the list commands.
  • s: the set commands.
  • h: the hash commands.
  • z: the sorted set commands.
  • x: the expired events. An expired event is generated when an expired key is deleted.
  • e: the eviction events. An eviction event is generated when a key is deleted due to the policy specified by the maxmemory-policy parameter.
  • A: the alias for g$lshzxe.
Supported Not Provided Not supported Supported
set-max-intset-entries

The maximum number of data entries in a set to support inset encoding. A set uses inset encoding when both of the following conditions are met:

  1. The number of entries in the set is less than or equal to the value of the set-max-intset-entries parameter.
  2. The set only contains radix-10 integers in the range of 64-bit signed integers.
Supported Supported Supported Supported
slowlog-log-slower-than Specifies whether to log slow queries.
  • Negative value: does not log slow queries.
  • 0: logs all queries.
  • Positive value: logs queries of which the duration exceeded the specified value.

Value range: 0 to 10000000. Default value: 10000. Unit: microseconds.

Supported Supported Supported Supported
slowlog-max-len The maximum number of slow query logs that can be stored. Value range: 100 to 10000. Default value: 1024. Supported Supported Supported Supported
stream-node-max-bytes The maximum amount of memory in bytes that each macro node in a stream can consume. Value range: 0 to 999999999999999. Unit: bytes. A value of 0 means that the amount of consumed memory is not limited. Not Provided Not Provided Not Provided Not supported
stream-node-max-entries The maximum number of entries stored on each macro node in a stream. Value range: 0 to 999999999999999. A value of 0 means that the number of entries on each node is not limited. Not Provided Not Provided Not Provided Not supported
timeout Specifies a timeout period. The system terminates a connection to a client if the client has been idle for the specified timeout period. Value range: 0 to 100000. Unit: seconds. A value of 0 means that no timeout period is specified for connections. Supported Not Provided Not supported Supported
zset-max-ziplist-entries

The upper limit of the number of key-value pairs stored in a sorted set to support ziplist encoding. A sorted set uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the sorted set is less than the value of the zset-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the sorted set is less than the value of the zset-max-ziplist-entries parameter.
Supported Supported Supported Supported
zset-max-ziplist-value

The upper limit of the number of bytes in each key-value pair stored in a sorted set to support ziplist encoding. A sorted set uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the sorted set is less than the value of the zset-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the sorted set is less than the value of the zset-max-ziplist-entries parameter.
Supported Supported Supported Supported
list-max-ziplist-entries

The upper limit of the number of bytes in each element stored in a list to support ziplist encoding. A list uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each element stored in the list is less than the value of the list-max-ziplist-value parameter.
  2. The number of elements stored in the list is less than the value of the list-max-ziplist-entries parameter.
Not Provided Not Provided Not Provided Not supported
list-max-ziplist-value

The upper limit of the number of bytes in each element stored in a list to support ziplist encoding. A list uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each element stored in the list is less than the value of the list-max-ziplist-value parameter.
  2. The number of elements stored in the list is less than the value of the list-max-ziplist-entries parameter.
Not Provided Not Provided Not Provided Not supported
cluster_compat_enable Specifies whether to enable the compatibility with the native Redis cluster syntax. Valid values:
  • 0: disables the compatibility with the native Redis cluster syntax.
  • 1: enables the compatibility with the native Redis cluster syntax. This is the default value.
Not supported Supported Supported Unsupported
script_check_enable Specifies whether to verify that the keys used in Lua scripts are mapped to the same slot. Valid values:
  • 0: does not check whether the keys are mapped to the same slot.
  • 1: checks whether the keys are mapped to the same slot. This is the default value.
Not supported Supported Supported Unsupported
readonly_lua_route_ronode_enable The Lua execution mode of the read-only replica. Valid values:
  • 0: the default value indicates that the Lua execution mode is disabled. Read-only replicas do not support Lua, and the Lua command is processed by the primary node.
  • 1: indicating that the Lua execution mode is enabled. Lua that only includes read operations will be forwarded to the read-only replica.
Not Provided Not supported Supported Unsupported
transfer_subscrible_to_psubscrible_enable Enables or disables the function that turns SUBSCRIBE requests to PSUBSCRIBE requests. Valid values:
  • 0: the default value, indicates that the function is disabled.
  • 1: indicates that this feature is enabled. Redis Proxy will SUBSCRIBE convert to PSUBSCRIBE processing. If you use the PUB/SUB commands in the Lua, you can enable the function when the channel to be subscribed cannot receive the notification.
Not supported Supported Supported Unsupported

For more information about the parameters, see redis.conf for Redis 4.0.

Redis 2.8 custom parameters

Parameter Description Standard Edition Cluster Edition Read/Write Splitting Zone-disaster recovery instance
#no_loose_audit-read-enabled Enable or disable read request audit. After audit, the read request is displayed in the log. Not supported Supported Supported Supported (except Standard Edition)
#no_loose_check-whitelist-always Specifies whether to verify that the client IP address is in a whitelist of the ApsaraDB for Redis instance if password-free access is enabled in a Virtual Private Cloud (VPC) network. Default value: no. If you set this parameter to yes, the whitelist still takes effect for password-free access over a VPC network. Valid values:
  • yes: specifies that the system checks whether a client IP address is in a whitelist.
  • no: disables the compatibility with the Sentinel mode. This is the default value.
Not Provided Not Provided Not Provided Not supported
#no_loose_disabled-commands

Specifies the commands that you want to disable, including FLUSHALL, FLUSHDB, KEYS, HGETALL, EVAL, EVALSHA, and SCRIPT.

Supported Supported Supported Supported
#no_loose_ssl-enabled Specifies whether to enable SSL-based connections. Valid values:
  • yes: enables SSL-based connections.
  • no: disables the compatibility with the Sentinel mode. This is the default value.
Not supported Supported Supported Unsupported
#no_loose_sentinel-enabled Specifies whether to enable the compatibility with the Sentinel mode. Valid values:
  • yes: enables the compatibility with the Sentinel mode.
  • no: disables the compatibility with the Sentinel mode. This is the default value.
Not Provided Not Provided Not Provided Not supported
appendonly Specifies whether to enable append-only file (AOF) persistence. Valid values:
  • yes: enables AOF persistence. This is the default value.
  • no: disables AOF persistence.
Note If you set this parameter to no, AOF persistence is disabled on the master node and remains functional on the replica node.
Supported Supported Supported Supported
client-output-buffer-limit pubsub Specifies output buffer limits of publisher and subscriber clients. The clients are disconnected when the specified limits are reached. Set this parameter in this format: <hard limit> <soft limit> <soft seconds>.
  • hard limit: disconnects a client if the output buffer of the client is larger than or equal to the value specified by the hard limit field. Unit: bytes.
  • soft limit and soft seconds: disconnects a client if the output buffer of the client is larger than or equal to the value specified by the soft limit field and if this situation lasts for a period longer than or equal to the value specified by the soft seconds field. The soft limit value is measured in bytes, and the soft seconds value is measured in seconds.
Supported Supported Supported Supported
dynamic-hz Specifies whether to enable a dynamic hz value. Valid values:
  • yes: enables a dynamic hz value. This is the default value.
  • no: disables a dynamic hz value.
Not Provided Not Provided Not Provided Not supported
hash-max-ziplist-entries

The upper limit of the number of bytes in each key-value pair stored in a hash to support ziplist encoding. The ziplist data structure is used only if both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the hash is less than the value of the hash-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the hash is less than the value of the hash-max-ziplist-entries parameter.
Supported Supported Supported Supported
hash-max-ziplist-value

The upper limit of the number of bytes in each key-value pair stored in a hash to support ziplist encoding. The ziplist data structure is used only if both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the hash is less than the value of the hash-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the hash is less than the value of the hash-max-ziplist-entries parameter.
Supported Supported Supported Supported
hz Specifies the frequency at which Redis background tasks are performed. For example, to evict expired keys, you can specify a value from 1 to 500 as the task frequency. The default value is 10. A higher value results in higher CPU consumption but allows the system to delete expired keys and terminate timeout connections more frequently. We recommend that you do not specify a value larger than 100. Supported Supported Supported Supported
lazyfree-lazy-eviction Specifies whether to use Lazyfree to evict data. Valid values:
  • yes: enables Lazyfree to evict data.
  • no: disables Lazyfree to evict data. This is the default value.
Not Provided Not Provided Not Provided Not supported
lazyfree-lazy-expire Specifies whether to use Lazyfree to delete expired keys. Valid values:
  • yes: enables Lazyfree to delete expired keys. This is the default value.
  • no: disables asynchronous deletion.
Not Provided Not Provided Not Provided Not supported
lazyfree-lazy-server-del Specifies whether to run the DEL command and asynchronously delete data based on Lazyfree.
  • yes: enables asynchronous deletion. This is the default value.
  • no: disables asynchronous deletion.
Not Provided Not Provided Not Provided Not supported
list-compress-depth

Specifies the number of entries that are not compressed at both ends of a list. Value range: 0 to 65535.

  • 0: specifies that no node of the list is compressed. This is the default value.
  • 1: specifies that the first node from each side of the list is not compressed, but all nodes between these two nodes are compressed.
  • 2: specifies that the first two nodes from each side of the list are not compressed, but all nodes between these four nodes are compressed.
  • 3: specifies that the first three nodes from each side of the list are not compressed, but all nodes between these six nodes are compressed.
  • Other values specify similar rules.
Not Provided Not Provided Not Provided Not supported
list-max-ziplist-size
  • The maximum length of a ziplist in a quicklist. A positive value specifies the maximum number of elements in each ziplist of a quicklist. For example, if you set this parameter to 5, each ziplist of a quicklist can contain a maximum of five elements.
  • A negative number indicates the maximum number of bytes in each ziplist of a quicklist. Valid values: [-5, -1], where:
    • -5: specifies that each ziplist of a quicklist cannot exceed 64 KB (1 KB = 1,024 bytes).
    • -4: specifies that each ziplist of a quicklist cannot exceed 32 KB.
    • -3: specifies that each ziplist of a quicklist cannot exceed 16 KB.
    • -2: specifies that each ziplist of a quicklist cannot exceed 8 KB. This is the default value.
    • -1: specifies that each ziplist of a quicklist cannot exceed 4 KB.
Not Provided Not Provided Not Provided Not supported
maxmemory-policy

Specifies the policy used to evict data when the system runs out of memory. Valid values:

  • volatile-lru: evicts the approximated least recently used (LRU) keys among keys that have time-to-live (TTL) values configured.
  • allkeys-lru: evicts the approximated LRU keys.
  • volatile-lfu: evicts the approximated least frequently used (LFU) keys among keys that have TTL values configured.
  • allkeys-lfu: evicts the approximated LFU keys.
  • volatile-random: evicts random keys among keys that have TTL values configured.
  • allkeys-random: evicts random keys.
  • volatile-ttl: evicts keys with the minimum TTL. The LRU, LFU, and volatile-ttl policies use approximated randomized algorithms.
  • noeviction: specifies that the system does not evict any keys, but returns an error for write operations.
Supported Supported Supported Supported
notify-keyspace-events

The types of events of which the Redis server can notify clients. The value of this parameter is any combination of the following characters,

  • each of which specifies a type of event:
  • K: the keyspace events, published with the __keyspace@<db>__ prefix.
  • E: the key events, published with the __keyevent@<db>__ prefix.
  • g: the generic commands that are non-type specific, such as DEL, EXPIRE, and RENAME.
  • l: the list commands.
  • s: the set commands.
  • h: the hash commands.
  • z: the sorted set commands.
  • x: the expired events. An expired event is generated when an expired key is deleted.
  • e: the eviction events. An eviction event is generated when a key is deleted due to the policy specified by the maxmemory-policy parameter.
  • A: the alias for g$lshzxe.
Supported Not Provided Not supported Supported
set-max-intset-entries

The maximum number of data entries in a set to support inset encoding. A set uses inset encoding when both of the following conditions are met:

  1. The number of entries in the set is less than or equal to the value of the set-max-intset-entries parameter.
  2. The set only contains radix-10 integers in the range of 64-bit signed integers.
Supported Supported Supported Supported
slowlog-log-slower-than Specifies whether to log slow queries.
  • Negative value: does not log slow queries.
  • 0: logs all queries.
  • Positive value: logs queries of which the duration exceeded the specified value.

Value range: 0 to 10000000. Default value: 10000. Unit: microseconds.

Supported Supported Supported Supported
slowlog-max-len The maximum number of slow query logs that can be stored. Value range: 100 to 10000. Default value: 1024. Supported Supported Supported Supported
stream-node-max-bytes The maximum amount of memory in bytes that each macro node in a stream can consume. Value range: 0 to 999999999999999. Unit: bytes. A value of 0 means that the amount of consumed memory is not limited. Not Provided Not Provided Not Provided Not supported
stream-node-max-entries The maximum number of entries stored on each macro node in a stream. Value range: 0 to 999999999999999. A value of 0 means that the number of entries on each node is not limited. Not Provided Not Provided Not Provided Not supported
timeout Specifies a timeout period. The system terminates a connection to a client if the client has been idle for the specified timeout period. Value range: 0 to 100000. Unit: seconds. A value of 0 means that no timeout period is specified for connections. Not Provided Not Provided Not Provided Not supported
zset-max-ziplist-entries

The upper limit of the number of key-value pairs stored in a sorted set to support ziplist encoding. A sorted set uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the sorted set is less than the value of the zset-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the sorted set is less than the value of the zset-max-ziplist-entries parameter.
Supported Supported Supported Supported
zset-max-ziplist-value

The upper limit of the number of bytes in each key-value pair stored in a sorted set to support ziplist encoding. A sorted set uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each key-value pair stored in the sorted set is less than the value of the zset-max-ziplist-value parameter.
  2. The number of key-value pairs stored in the sorted set is less than the value of the zset-max-ziplist-entries parameter.
Supported Supported Supported Supported
list-max-ziplist-entries

The upper limit of the number of bytes in each element stored in a list to support ziplist encoding. A list uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each element stored in the list is less than the value of the list-max-ziplist-value parameter.
  2. The number of elements stored in the list is less than the value of the list-max-ziplist-entries parameter.
Supported Supported Supported Supported
list-max-ziplist-value

The upper limit of the number of bytes in each element stored in a list to support ziplist encoding. A list uses ziplist encoding when both of the following conditions are met:

  1. The number of bytes in each element stored in the list is less than the value of the list-max-ziplist-value parameter.
  2. The number of elements stored in the list is less than the value of the list-max-ziplist-entries parameter.
Supported Supported Supported Supported
cluster_compat_enable Specifies whether to enable the compatibility with the native Redis cluster syntax. Valid values:
  • 0: disables the compatibility with the native Redis cluster syntax.
  • 1: enables the compatibility with the native Redis cluster syntax. This is the default value.
Not supported Supported Supported Unsupported
script_check_enable Specifies whether to verify that the keys used in Lua scripts are mapped to the same slot. Valid values:
  • 0: does not check whether the keys are mapped to the same slot.
  • 1: checks whether the keys are mapped to the same slot. This is the default value.
Not supported Supported Supported Unsupported
readonly_lua_route_ronode_enable The Lua execution mode of the read-only replica. Valid values:
  • 0: the default value, indicates that the Lua execution mode is disabled. Read-only replicas do not support Lua, and the Lua command is processed by the primary node.
  • 1: indicating that the Lua execution mode is enabled. Lua that only includes read operations will be forwarded to the read-only replica.
Not Provided Not supported Supported Unsupported
transfer_subscrible_to_psubscrible_enable Enables or disables the function that turns SUBSCRIBE requests to PSUBSCRIBE requests. Valid values:
  • 0: the default value, indicates that the function is disabled.
  • 1: indicates that this feature is enabled. Redis Proxy will SUBSCRIBE convert to PSUBSCRIBE processing. If you use the PUB/SUB commands in the Lua, you can enable the function when the channel to be subscribed cannot receive the notification.
Not Provided Not Provided Not Provided Not supported

For more information about the parameters, see redis.conf for Redis 2.8.

Modify parameters in the ApsaraDB for Redis console

  1. Log on to the ApsaraDB for Redis console.
  2. In the top navigation bar, select the region where the target instance is located.
  3. On the Instances page, click the Instance ID of the target instance.
  4. In the left-side navigation pane of the Instance Information page, click System Parameters.
  5. On the System Parameters page, find the parameter that you want to set and click Modify in the Action column.
  6. In the dialog box that appears, set the parameter value and click OK.

Call API operations to set parameters

You can also call the ModifyInstanceConfig operation to set parameters.

Related operations

Operation Description
# no_loose_audit-read-enabled Enable or disable read request audit. After audit, the read request is displayed in the log.
DescribeParameters Queries configuration parameters and running parameters of an ApsaraDB for Redis instance.
ModifyInstanceConfig Modifies configuration parameters of an ApsaraDB for Redis instance.

FAQ

  • Can I modify the maxclients parameter?

    A: The value of maxclients is used to change the maximum number of connections to an apsaradb for Redis data node. Currently, you cannot change the value of maxclients. For apsaradb for Redis instances of the performance enhancement edition, the default value is 10000. To increase the maximum number of connections, upgrade the instance configuration and increase the number of nodes.

  • What is a zone-disaster recovery instance?

    A: When creating an apsaradb for MongoDB instance, if you select the zone for zone-disaster recovery, for example, virginia zone (A + B), the instance is a zone-disaster recovery instance. For more information, see Zone-disaster recovery.