Redis specific parameters - Amazon MemoryDB for Redis

Redis specific parameters

If you do not specify a parameter group for your Redis cluster, then a default parameter group appropriate to your engine version will be used. You can't change the values of any parameters in the default parameter group. However, you can create a custom parameter group and assign it to your cluster at any time as long as the values of conditionally modifiable parameters are the same in both parameter groups. For more information, see Creating a parameter group.

Redis 7 parameter changes

Note

MemoryDB has introduced a preview release of Vector search that includes a new immutable parameter group default.memorydb-redis7.search.preview. This parameter group is available in the MemoryDB console and when creating a new vector-search-enabled cluster using the create-cluster CLI command. The preview release is available in the following AWS Regions: US East (N. Virginia), US East (Ohio), US West (Oregon), Asia Pacific (Tokyo), and Europe (Ireland).

Parameter group family: memorydb_redis7

Parameters added in Redis 7 are as follows.

Name Details Description
latency-tracking

Permitted values: yes, no

Default: no

Type: string

Modifiable: Yes

Changes take effect: Immediately across all nodes in the cluster.

When set to yes tracks the per command latencies and enables exporting the percentile distribution via the INFO latency statistics command, and cumulative latency distributions (histograms) via the LATENCY command.

hash-max-listpack-entries

Permitted values: 0+

Default: 512

Type: integer

Modifiable: Yes

Changes take effect: Immediately across all nodes in the cluster.

The maximum number of hash entries in order for the dataset to be compressed.

hash-max-listpack-value

Permitted values: 0+

Default: 64

Type: integer

Modifiable: Yes

Changes take effect: Immediately across all nodes in the cluster.

The threshold of biggest hash entries in order for the dataset to be compressed.

zset-max-listpack-entries

Permitted values: 0+

Default: 128

Type: integer

Modifiable: Yes

Changes take effect: Immediately across all nodes in the cluster.

The maximum number of sorted set entries in order for the dataset to be compressed.

zset-max-listpack-value

Permitted values: 0+

Default: 64

Type: integer

Modifiable: Yes

Changes take effect: Immediately across all nodes in the cluster.

The threshold of biggest sorted set entries in order for the dataset to be compressed.

Parameters changed in Redis 7 are as follows.

Name Details Description
activerehashing

Modifiable: no. In Redis 7, this parameter is hidden and enabled by default. In order to disable it, you need to create a support case.

Modifiable was yes.

Parameters removed in Redis 7 are as follows.

Name Details Description
hash-max-ziplist-entries

Permitted values: 0+

Default: 512

Type: integer

Modifiable: Yes

Changes take effect: Immediately across all nodes in the cluster.

Use listpack instead of ziplist for representing small hash encoding

hash-max-ziplist-value

Permitted values: 0+

Default: 64

Type: integer

Modifiable: Yes

Changes take effect: Immediately across all nodes in the cluster.

Use listpack instead of ziplist for representing small hash encoding

zset-max-ziplist-entries

Permitted values: 0+

Default: 128

Type: integer

Modifiable: Yes

Changes take effect: Immediately across all nodes in the cluster.

Use listpack instead of ziplist for representing small hash encoding.

zset-max-ziplist-value

Permitted values: 0+

Default: 64

Type: integer

Modifiable: Yes

Changes take effect: Immediately across all nodes in the cluster.

Use listpack instead of ziplist for representing small hash encoding.

Redis 6 parameters

Note

In Redis engine version 6.2, when the r6gd node family was introduced for use with Data tiering, only noeviction, volatile-lru and allkeys-lru max-memory policies are supported with r6gd node types.

Parameter group family: memorydb_redis6

Parameters added in Redis 6 are as follows.

Name Details Description
maxmemory-policy

Type: STRING

Permitted values: volatile-lru,allkeys-lru,volatile-lfu,allkeys-lfu,volatile-random,allkeys-random,volatile-ttl,noeviction

Default: noeviction

The eviction policy for keys when maximum memory usage is reached.

For more information, see Using Redis as an LRU cache Using Redis as an LRU cache.

list-compress-depth

Type: INTEGER

Permitted values: 0-

Default: 0

Compress depth is the number of quicklist ziplist nodes from each side of the list to exclude from compression. The head and tail of the list are always uncompressed for fast push and pop operations. Settings are:
  • 0: Disable all compression.

  • 1: Start compressing with the 1st node in from the head and tail.

    [head]->node->node->...->node->[tail]

    All nodes except [head] and [tail] compress.

  • 2: Start compressing with the 2nd node in from the head and tail.

    [head]->[next]->node->node->...->node->[prev]->[tail]

    [head], [next], [prev], [tail] do not compress. All other nodes compress.

  • Etc.

hll-sparse-max-bytes

Type: INTEGER

Permitted values: 1-16000

Default: 3000

HyperLogLog sparse representation bytes limit. The limit includes the 16 byte header. When a HyperLogLog using the sparse representation crosses this limit, it is converted into the dense representation.

A value greater than 16000 is not recommended, because at that point the dense representation is more memory efficient.

We recommend a value of about 3000 to have the benefits of the space-efficient encoding without slowing down PFADD too much, which is O(N) with the sparse encoding. The value can be raised to ~10000 when CPU is not a concern, but space is, and the data set is composed of many HyperLogLogs with cardinality in the 0 - 15000 range.

lfu-log-factor

Type: INTEGER

Permitted values: 1-

Default: 10

The log factor for incrementing key counter for LFU eviction policy.

lfu-decay-time

Type: INTEGER

Permitted values: 0-

Default: 1

The amount of time in minutes to decrement the key counter for LFU eviction policy.

active-defrag-max-scan-fields

Type: INTEGER

Permitted values: 1-1000000

Default: 1000

Maximum number of set/hash/zset/list fields that will be processed from the main dictionary scan during active defragmentation.

active-defrag-threshold-upper

Type: INTEGER

Permitted values: 1-100

Default: 100

Maximum percentage of fragmentation at which we use maximum effort.

client-output-buffer-limit-pubsub-hard-limit

Type: INTEGER

Permitted values: 0-

Default: 33554432

For Redis publish/subscribe clients: If a client's output buffer reaches the specified number of bytes, the client will be disconnected.

client-output-buffer-limit-pubsub-soft-limit

Type: INTEGER

Permitted values: 0-

Default: 8388608

For Redis publish/subscribe clients: If a client's output buffer reaches the specified number of bytes, the client will be disconnected, but only if this condition persists for client-output-buffer-limit-pubsub-soft-seconds.

client-output-buffer-limit-pubsub-soft-seconds

Type: INTEGER

Permitted values: 0-

Default: 60

For Redis publish/subscribe clients: If a client's output buffer remains at client-output-buffer-limit-pubsub-soft-limit bytes for longer than this number of seconds, the client will be disconnected.

timeout

Type: INTEGER

Permitted values: 0,20-

Default: 0

The number of seconds a node waits before timing out. Values are:

  • 0 – never disconnect an idle client.

  • 1-19 – invalid values.

  • >=20 – the number of seconds a node waits before disconnecting an idle client.

notify-keyspace-events

Type: STRING

Permitted values: NULL

Default: NULL

The keyspace events for Redis to notify Pub/Sub clients about. By default all notifications are disabled.

maxmemory-samples

Type: INTEGER

Permitted values: 1-

Default: 3

For least-recently-used (LRU) and time-to-live (TTL) calculations, this parameter represents the sample size of keys to check. By default, Redis chooses 3 keys and uses the one that was used least recently.

slowlog-max-len

Type: INTEGER

Permitted values: 0-

Default: 128

The maximum length of the Redis Slow Log. There is no limit to this length. Just be aware that it will consume memory. You can reclaim memory used by the slow log with SLOWLOG RESET.

activerehashing

Type: STRING

Permitted values: yes,no

Default: yes

The main hash table is rehashed ten times per second; each rehash operation consumes 1 millisecond of CPU time.

This value is set when you create the parameter group. When assigning a new parameter group to a cluster, this value must be the same in both the old and new parameter groups.

client-output-buffer-limit-normal-hard-limit

Type: INTEGER

Permitted values: 0-

Default: 0

If a client's output buffer reaches the specified number of bytes, the client will be disconnected. The default is zero (no hard limit).

client-output-buffer-limit-normal-soft-limit

Type: INTEGER

Permitted values: 0-

Default: 0

If a client's output buffer reaches the specified number of bytes, the client will be disconnected, but only if this condition persists for client-output-buffer-limit-normal-soft-seconds. The default is zero (no soft limit).

client-output-buffer-limit-normal-soft-seconds

Type: INTEGER

Permitted values: 0-

Default: 0

If a client's output buffer remains at client-output-buffer-limit-normal-soft-limit bytes for longer than this number of seconds, the client will be disconnected. The default is zero (no time limit).

tcp-keepalive

Type: INTEGER

Permitted values: 0-

Default: 300

If this is set to a nonzero value (N), node clients are polled every N seconds to ensure that they are still connected. With the default setting of 0, no such polling occurs.

active-defrag-cycle-min

Type: INTEGER

Permitted values: 1-75

Default: 5

Minimal effort for defrag in CPU percentage.

stream-node-max-bytes

Type: INTEGER

Permitted values: 0-

Default: 4096

The stream data structure is a radix tree of nodes that encode multiple items inside. Use this configuration to specify the maximum size of a single node in radix tree in Bytes. If set to 0, the size of the tree node is unlimited.

stream-node-max-entries

Type: INTEGER

Permitted values: 0-

Default: 100

The stream data structure is a radix tree of nodes that encode multiple items inside. Use this configuration to specify the maximum number of items a single node can contain before switching to a new node when appending new stream entries. If set to 0, the number of items in the tree node is unlimited.

lazyfree-lazy-eviction

Type: STRING

Permitted values: yes,no

Default: no

Perform an asynchronous delete on evictions.

active-defrag-ignore-bytes

Type: INTEGER

Permitted values: 1048576-

Default: 104857600

Minimum amount of fragmentation waste to start active defrag.

lazyfree-lazy-expire

Type: STRING

Permitted values: yes,no

Default: no

Perform an asynchronous delete on expired keys.

active-defrag-threshold-lower

Type: INTEGER

Permitted values: 1-100

Default: 10

Minimum percentage of fragmentation to start active defrag.

active-defrag-cycle-max

Type: INTEGER

Permitted values: 1-75

Default: 75

Maximal effort for defrag in CPU percentage.

lazyfree-lazy-server-del

Type: STRING

Permitted values: yes,no

Default: no

Performs an asynchronous delete for commands which update values.

slowlog-log-slower-than

Type: INTEGER

Permitted values: 0-

Default: 10000

The maximum execution time, in microseconds, to exceed in order for the command to get logged by the Redis Slow Log feature. Note that a negative number disables the slow log, while a value of zero forces the logging of every command.

hash-max-ziplist-entries

Type: INTEGER

Permitted values: 0-

Default: 512

Determines the amount of memory used for hashes. Hashes with fewer than the specified number of entries are stored using a special encoding that saves space.

hash-max-ziplist-value

Type: INTEGER

Permitted values: 0-

Default: 64

Determines the amount of memory used for hashes. Hashes with entries that are smaller than the specified number of bytes are stored using a special encoding that saves space.

set-max-intset-entries

Type: INTEGER

Permitted values: 0-

Default: 512

Determines the amount of memory used for certain kinds of sets (strings that are integers in radix 10 in the range of 64 bit signed integers). Such sets with fewer than the specified number of entries are stored using a special encoding that saves space.

zset-max-ziplist-entries

Type: INTEGER

Permitted values: 0-

Default: 128

Determines the amount of memory used for sorted sets. Sorted sets with fewer than the specified number of elements are stored using a special encoding that saves space.

zset-max-ziplist-value

Type: INTEGER

Permitted values: 0-

Default: 64

Determines the amount of memory used for sorted sets. Sorted sets with entries that are smaller than the specified number of bytes are stored using a special encoding that saves space.

tracking-table-max-keys

Type: INTEGER

Permitted values: 1-100000000

Default: 1000000

To assist client-side caching, Redis supports tracking which clients have accessed which keys.

When the tracked key is modified, invalidation messages are sent to all clients to notify them their cached values are no longer valid. This value enables you to specify the upper bound of this table.

acllog-max-len

Type: INTEGER

Permitted values: 1-10000

Default: 128

The maximum number of entries in the ACL Log.

active-expire-effort

Type: INTEGER

Permitted values: 1-10

Default: 1

Redis deletes keys that have exceeded their time to live by two mechanisms. In one, a key is accessed and is found to be expired. In the other, a periodic job samples keys and causes those that have exceeded their time to live to expire. This parameter defines the amount of effort that Redis uses to expire items in the periodic job.

The default value of 1 tries to avoid having more than 10 percent of expired keys still in memory. It also tries to avoid consuming more than 25 percent of total memory and to add latency to the system. You can increase this value up to 10 to increase the amount of effort spent on expiring keys. The tradeoff is higher CPU and potentially higher latency. We recommend a value of 1 unless you are seeing high memory usage and can tolerate an increase in CPU utilization.

lazyfree-lazy-user-del

Type: STRING

Permitted values: yes,no

Default: no

Specifies whether the default behavior of DEL command acts the same as UNLINK.

activedefrag

Type: STRING

Permitted values: yes,no

Default: no

Enabled active memory defragmentation.

maxclients

Type: INTEGER

Permitted values: 65000

Default: 65000

The maximum number of clients that can be connected at one time. Non modifiable.

client-query-buffer-limit

Type: INTEGER

Permitted values: 1048576-1073741824

Default: 1073741824

Max size of a single client query buffer. Change takes place immediately.

proto-max-bulk-len

Type: INTEGER

Permitted values: 1048576-536870912

Default: 536870912

Max size of a single element request. Change takes place immediately.

MemoryDB node-type specific parameters

Although most parameters have a single value, some parameters have different values depending on the node type used. The following table shows the default value for the maxmemory for each node type. The value of maxmemory is the maximum number of bytes available to you for use, data and other uses, on the node.

Node type Maxmemory
db.r7g.large 14037181030
db.r7g.xlarge 28261849702
db.r7g.2xlarge 56711183565
db.r7g.4xlarge 113609865216
db.r7g.8xlarge 225000375228
db.r7g.12xlarge 341206346547
db.r7g.16xlarge 450000750456
db.r6gd.xlarge 28261849702
db.r6gd.2xlarge 56711183565
db.r6gd.4xlarge 113609865216
db.r6gd.8xlarge 225000375228
db.r6g.large 14037181030
db.r6g.xlarge 28261849702
db.r6g.2xlarge 56711183565
db.r6g.4xlarge 113609865216
db.r6g.8xlarge 225000375228
db.r6g.12xlarge 341206346547
db.r6g.16xlarge 450000750456
db.t4g.small 1471026299
db.t4g.medium 3317862236
Note

All MemoryDB instance types must be created in an Amazon Virtual Private Cloud VPC.