Back to Redis

Tune

content/operate/rs/references/cli-utilities/rladmin/tune.md

latest28.1 KB
Original Source

Configures parameters for databases, proxies, nodes, and clusters.

tune cluster

Configures cluster parameters.

sh
rladmin tune cluster
        [ repl_diskless { enabled | disabled } ]
        [ redis_provision_node_threshold <size> ]
        [ redis_migrate_node_threshold <size> ]
        [ redis_provision_node_threshold_percent <percent> ]
        [ redis_migrate_node_threshold_percent <percent> ]
        [ max_simultaneous_backups <number> ]
        [ failure_detection_sensitivity { high | low } ]
        [ watchdog_profile { cloud | local-network } ]
        [ slave_ha { enabled | disabled } ]
        [ slave_ha_grace_period <seconds> ]
        [ slave_ha_cooldown_period <seconds> ]
        [ slave_ha_bdb_cooldown_period <seconds> ]
        [ max_saved_events_per_type <value> ]
        [ metrics_exporter_expose_bdb_name { enabled | disabled } ]
        [ parallel_shards_upgrade <value> ]
        [ default_concurrent_restore_actions <value> ]
        [ show_internals { enabled | disabled } ]
        [ expose_hostnames_for_all_suffixes { enabled | disabled } ]
        [ redis_upgrade_policy { latest | major } ]
        [ default_redis_version <value> ]
        [ default_non_sharded_proxy_policy { single | all-master-shards | all-nodes } ]
        [ default_sharded_proxy_policy { single | all-master-shards | all-nodes } ]
        [ default_shards_placement { dense | sparse } ]
        [ data_internode_encryption { enabled | disabled } ]
        [ db_conns_auditing { enabled | disabled } ]
        [ acl_pubsub_default { resetchannels | allchannels } ]
        [ resp3_default { enabled | disabled } ]
        [ automatic_node_offload { enabled | disabled } ]
        [ auto_recovery { enabled | disabled } ]
        [ default_recovery_wait_time <value> ]
        [ default_tracking_table_max_keys_policy <value> ]
        [ default_oss_sharding { enabled | disabled } ]
        [ filter_node_wd_health_metrics { enabled | disabled } ]
 ]

Parameters

ParametersType/ValueDescription
acl_pubsub_defaultresetchannels
allchannelsDefault pub/sub ACL rule for all databases in the cluster:
resetchannels blocks access to all channels (restrictive)
allchannels allows access to all channels (permissive)
automatic_node_offloadenabled
disabledDefine whether automatic node offload migration will take place
auto_recoveryenabled
disabledDefines whether to use automatic recovery after shard failure
data_internode_encryptionenabled
disabledActivates or deactivates [internode encryption]({{< relref "/operate/rs/security/encryption/internode-encryption" >}}) for new databases
db_conns_auditingenabled
disabledActivates or deactivates [connection auditing]({{< relref "/operate/rs/security/audit-events" >}}) by default for new databases of a cluster
default_concurrent_restore_actionsinteger
allDefault number of concurrent actions when restoring a node from a snapshot (positive integer or "all")
default_non_sharded_proxy_policysingle

all-master-shards

all-nodes | Default [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) for newly created non-sharded databases' endpoints | | default_oss_sharding | enabled disabled | Default hashing policy to use for new databases. Set to disabled by default. This field is for future use only and should not be changed. | | default_recovery_wait_time | integer | The default time for new databases to wait for the persistence file to be available during automatic recovery. After the wait time expires, auto recovery completes with potential data loss. The default -1 means to wait forever. | | default_redis_version | version number | The default Redis database compatibility version used to create new databases.

The value parameter should be a version number in the form of "x.y" where x represents the major version number and y represents the minor version number. The final value corresponds to the desired version of Redis.

You cannot set default_redis_version to a value higher than that supported by the current redis_upgrade_policy value. | | default_sharded_proxy_policy | single

all-master-shards

all-nodes | Default [proxy policy]({{< relref "/operate/rs/databases/configure/proxy-policy" >}}) for newly created sharded databases' endpoints | | default_shards_placement | dense sparse | New databases place shards according to the default [shard placement policy]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy" >}}) | | default_tracking_table_max_keys_policy | integer (default: 1000000) | Defines the default value of the client-side caching invalidation table size for new databases. 0 makes the cache unlimited. | | expose_hostnames_for_all_suffixes | enabled disabled | Exposes hostnames for all DNS suffixes | | failure_detection_sensitivity | high low | Predefined thresholds and timeouts for failure detection (previously known as watchdog_profile) • high (previously local-network) – high failure detection sensitivity, lower thresholds, faster failure detection and failover • low (previously cloud) – low failure detection sensitivity, higher tolerance for latency variance (also called network jitter) | | filter_node_wd_health_metrics | enabled disabled | When enabled, node_wd health metrics (<span class="break-all">shard_ping_failures</span>, <span class="break-all">endpoint_ping_failures</span>, <span class="break-all">dmc_ping_failures</span> and their duration counterparts) are not emitted to statsd | | login_lockout_counter_reset_after | time in seconds | Time after failed login attempt before the counter resets to 0 | | login_lockout_duration | time in seconds | Time a locked account remains locked ( "0" means only an admin can unlock the account) | | login_lockout_threshold | integer | Number of failed sign-in attempts to trigger locking a user account ("0" means never lock the account) | | max_saved_events_per_type | integer | Maximum number of events each type saved in CCS per object type | | max_simultaneous_backups | integer (default: 4) | Number of database backups allowed to run at the same time. Combines with max_redis_forks (set by tune node) to determine the number of shard backups allowed to run simultaneously. | | metrics_exporter_expose_bdb_name | enabled disabled | If enabled, adds a label with the database name to relevant metrics | | parallel_shards_upgrade | integer all | Number of shards upgraded in parallel during DB upgrade (positive integer or "all") | | redis_migrate_node_threshold | size in MB | Memory (in MBs by default or can be specified) needed to migrate a database between nodes | | redis_migrate_node_threshold_percent | percentage | Memory (in percentage) needed to migrate a database between nodes | | redis_provision_node_threshold | size in MB | Memory (in MBs by default or can be specified) needed to provision a new database | | redis_provision_node_threshold_percent | percentage | Memory (in percentage) needed to provision a new database | | redis_upgrade_policy | latest major | When you upgrade or create a new Redis database, this policy determines which version of Redis database compatibility is used.

Supported values are:<ul><li><p>latest, which applies the most recent Redis compatibility update (effective default prior to v6.2.4)<p></li><li>major, which applies the most recent major release compatibility update (default as of v6.2.4).</li></ul> | | repl_diskless | enabled disabled | Activates or deactivates diskless replication (can be overridden per database) | | resp3_default | enabled disabled | Determines the default value of the resp3 option upon upgrading a database to version 7.2 (defaults to enabled) | | show_internals | enabled disabled | Controls the visibility of internal databases that are only used for the cluster's management | | slave_ha | enabled disabled | Activates or deactivates [replica high availability]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) in the cluster (enabled by default; use rladmin tune db to change slave_ha for a specific database)

Deprecated as of Redis Software v7.2.4. | | slave_ha_bdb_cooldown_period | time in seconds (default: 7200) | Time (in seconds) a database must wait after its shards are relocated by [replica high availability]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) before it can go through another shard migration if another node fails (default is 2 hours) | | slave_ha_cooldown_period | time in seconds (default: 3600) | Time (in seconds) [replica high availability]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) must wait after relocating shards due to node failure before performing another shard migration for any database in the cluster (default is 1 hour) | | slave_ha_grace_period | time in seconds (default: 600) | Time (in seconds) between when a node fails and when [replica high availability]({{< relref "/operate/rs/databases/configure/replica-ha" >}}) starts relocating shards to another node | | watchdog_profile | cloud local-network | Watchdog profiles with preconfigured thresholds and timeouts (deprecated as of Redis Software v6.4.2-69; use <span class="break-all">failure_detection_sensitivity</span> instead) • cloud is suitable for common cloud environments and has a higher tolerance for latency variance (also called network jitter). • local-network is suitable for dedicated LANs and has better failure detection and failover times. |

Returns

Returns Finished successfully if the cluster configuration was changed. Otherwise, it returns an error.

Use [rladmin info cluster]({{< relref "/operate/rs/references/cli-utilities/rladmin/info#info-cluster" >}}) to verify the cluster configuration was changed.

Example

sh
$ rladmin tune cluster slave_ha enabled
Finished successfully
$ rladmin info cluster | grep slave_ha
    slave_ha: enabled

tune db

Configures database parameters.

sh
rladmin tune db { db:<id> | <name> }
        [ slave_buffer <auto | valueMB | hard:soft:time> ]
        [ client_buffer <value> ]
        [ repl_backlog <valueMB | auto> ]
        [ crdt_repl_backlog <valueMB | auto> ]
        [ repl_timeout <seconds> ]
        [ repl_diskless { enabled | disabled | default } ]
        [ master_persistence { enabled | disabled } ]
        [ maxclients <value> ]
        [ schedpolicy { cmp | mru | spread | mnp } ]
        [ max_shard_pipeline <value> ]
        [ conns <value> ]
        [ conns_type <value> ]
        [ max_client_pipeline <value> ]
        [ max_connections <value> ]
        [ max_aof_file_size <size> ]
        [ max_aof_load_time <seconds> ]
        [ oss_cluster { enabled | disabled } ]
        [ oss_cluster_api_preferred_ip_type <value> ]
        [ slave_ha { enabled | disabled } ]
        [ slave_ha_priority <value> ]
        [ skip_import_analyze { enabled | disabled } ]
        [ mkms { enabled | disabled } ]
        [ continue_on_error ]
        [ gradual_src_mode { enabled | disabled } ]
        [ gradual_sync_mode { enabled | disabled | auto } ]
        [ gradual_sync_max_shards_per_source <value> ]
        [ module_name <value> ] [ module_config_params <value> ]
        [ crdt_xadd_id_uniqueness_mode { liberal | semi-strict | strict } ]
        [ metrics_export_all { enabled | disabled } ]
        [ syncer_mode { distributed | centralized }]
        [ syncer_monitoring { enabled | disabled } ]
        [ mtls_allow_weak_hashing { enabled | disabled } ]
        [ mtls_allow_outdated_certs { enabled | disabled } ]
        [ data_internode_encryption { enabled | disabled } ]
        [ db_conns_auditing { enabled | disabled } ]
        [ resp3 { enabled | disabled } ]
        [ shards_placement { dense | sparse } ]
        [ tracking_table_max_keys <size> ]

Parameters

ParameterType/ValueDescription
db:idintegerID of the specified database
namestringName of the specified database
client_buffervalue in MB hard:soft:timeRedis client output buffer limits
connsintegerSize of internal connection pool, specified per-thread or per-shard depending on conns_type
conns_typeper-thread
per-shardSpecifies connection pool size as either per-thread or per-shard
continue_on_errorFlag that skips tuning shards that can't be reached
crdt_repl_backlogvalue in MB
autoSize of the Active-Active replication buffer
crdt_xadd_id_uniqueness_modeliberal
semi-strict
strictXADD's behavior in an Active-Active database, defined as liberal, semi-strict, or strict (see descriptions below)
data_internode_encryptionenabled
disabledActivates or deactivates [internode encryption]({{< relref "/operate/rs/security/encryption/internode-encryption" >}}) for the database
db_conns_auditingenabled
disabledActivates or deactivates database [connection auditing]({{< relref "/operate/rs/security/audit-events" >}}) for a database
gradual_src_modeenabled
disabledActivates or deactivates gradual sync of sources
gradual_sync_max_shards_per_sourceintegerNumber of shards per sync source that can be replicated in parallel (positive integer)
gradual_sync_modeenabled
disabled
autoActivates, deactivates, or automatically determines gradual sync of source shards
master_persistenceenabled
disabledIf enabled, persists the primary shard in addition to replica shards in a replicated and persistent database.
max_aof_file_sizesize in MBMaximum size (in MB, if not specified) of [AoF]({{< relref "/glossary/_index.md#letter-a" >}}) file (minimum value is 10 GB)
max_aof_load_timetime in secondsTime limit in seconds to load a shard from an append-only file (AOF). If exceeded, an AOF rewrite is initiated to decrease future load time.
Minimum: 2700 seconds (45 minutes)
Default: 3600 seconds (1 hour)
max_client_pipelineintegerMaximum commands in the proxy's pipeline per client connection (max value is 2047, default value is 200)
max_connectionsintegerMaximum client connections to the database's endpoint (default value is 0, which is unlimited)
max_shard_pipelineintegerMaximum commands in the proxy's pipeline per shard connection (default value is 200)
maxclientsintegerControls the maximum client connections between the proxy and shards (default value is 10000)
metrics_export_allenabled
disabledActivates the exporter to expose all shard metrics
mkmsenabled
disabledActivates multi-key multi-slot commands
module_config_paramsstringConfigures module arguments at runtime. Enclose module_config_params within quotation marks.
module_namesearch
ReJSON
graph
timeseries
bf
rgThe module to configure with module_config_params
mtls_allow_outdated_certsenabled
disabledIf enabled, allows outdated certificates in mTLS connections
mtls_allow_weak_hashingenabled
disabledActivates weak hashing (less than 2048 bits) in mTLS connections
oss_clusterenabled
disabledActivates OSS cluster API
oss_cluster_api_preferred_ip_typeinternal
externalIP type for the endpoint and database in the OSS cluster API (default is internal)
repl_backlogsize in MB
autoSize of the replication buffer
repl_disklessenabled
disabled
defaultActivates or deactivates diskless replication (defaults to the cluster setting)
repl_timeouttime in secondsReplication timeout (in seconds)
resp3enabled
disabledEnables or deactivates RESP3 support (defaults to enabled)
schedpolicycmp
mru
spread
mnpControls how server-side connections are used when forwarding traffic to shards
shards_placementdense
sparseConfigures the [shard placement policy]({{< relref "/operate/rs/databases/memory-performance/shard-placement-policy" >}}) for the database
skip_import_analyzeenabled
disabledSkips the analyzing step when importing a database
slave_bufferauto
value in MB
hard:soft:timeRedis replica output buffer limits
auto: dynamically adjusts the buffer limit based on the shard’s current used memory
• value in MB: sets the buffer limit in MB
• hard:soft:time: sets the hard limit (maximum buffer size in MB), soft limit in MB, and the time in seconds that the soft limit can be exceeded
slave_haenabled
disabledActivates or deactivates replica high availability (defaults to the cluster setting)
slave_ha_priorityintegerPriority of the database in the replica high-availability mechanism
syncer_modedistributed
centralizedConfigures syncer to run in distributed or centralized mode. For distributed syncer, the DMC policy must be all-nodes or all-master-nodes
syncer_monitoringenabled
disabledActivates syncer monitoring
tracking_table_max_keysintegerThe client-side caching invalidation table size. 0 makes the cache unlimited.
XADD behavior modeDescription
liberalXADD succeeds with any valid ID (not recommended, allows duplicate IDs)
semi-strictAllows a full ID. Partial IDs are completed with the unique database instance ID (not recommended, allows duplicate IDs).
strictXADD fails if a full ID is given. Partial IDs are completed using the unique database instance ID.

Returns

Returns Finished successfully if the database configuration was changed. Otherwise, it returns an error.

Use [rladmin info db]({{< relref "/operate/rs/references/cli-utilities/rladmin/info#info-db" >}}) to verify the database configuration was changed.

Example

sh
$ rladmin tune db db:4 repl_timeout 300
Tuning database: o
Finished successfully
$ rladmin info db db:4 | grep repl_timeout
  repl_timeout: 300 seconds

tune node

Configures node parameters.

sh
tune node  { <id> | all }
     [ max_listeners <value> ]
     [ max_redis_forks <value> ]
     [ max_redis_servers <value> ]
     [ max_slave_full_syncs <value> ]
     [ quorum_only { enabled | disabled } ]

Parameters

ParameterType/ValueDescription
idintegerID of the specified node
allConfigures settings for all nodes
max_listenersintegerMaximum number of endpoints that may be bound to the node
max_redis_forksintegerMaximum number of background processes forked from shards that may exist on the node at any given time
max_redis_serversintegerMaximum number of shards allowed to reside on the node
max_slave_full_syncsintegerMaximum number of simultaneous replica full-syncs that may be running at any given time (0: Unlimited, -1: Use cluster settings)
quorum_onlyenabled
disabledIf activated, configures the node as a [quorum-only node]({{< relref "/glossary/_index.md#letter-p" >}})

Returns

Returns Finished successfully if the node configuration was changed. Otherwise, it returns an error.

Use [rladmin info node]({{< relref "/operate/rs/references/cli-utilities/rladmin/info#info-node" >}}) to verify the node configuration was changed.

Example

sh
$ rladmin tune node 3 max_redis_servers 120
Finished successfully
$ rladmin info node 3 | grep "max redis servers"
    max redis servers: 120

tune proxy

Configures proxy parameters.

sh
rladmin tune proxy { <id> | all }
        [ mode { static | dynamic } ]
        [ threads <value> ]
        [ max_threads <value> ]
        [ scale_threshold <value> ]
        [ scale_duration <seconds> ]

Parameters

ParameterType/ValueDescription
idintegerID of the specified proxy
allConfigures settings for all proxies
client_evictionboolean (default: false)If true,, enables client eviction based on maxmemory_clients.
incoming_connections_capacityinteger (default: 0)The maximum number of concurrent incoming connections, also known as the maximum burst size. The default is 0, which means no limit.
incoming_connections_min_capacityinteger (default: 10)The minimum number of free slots required before accepting new connections after an overflow.
incoming_connections_rate_limitinteger (default: 0)The maximum number of incoming connections per second. The default is 0, which means no limit.
max_threadsinteger, (range: 1-255)Maximum number of threads allowed
modestatic
dynamicDetermines if the proxy automatically adjusts the number of threads based on load size
scale_durationtime in seconds, (range: 10-300)Time of scale_threshold CPU utilization before the automatic proxy automatically scales
scale_thresholdpercentage, (range: 50-99)CPU utilization threshold that triggers spawning new threads
threadsinteger, (range: 1-255)Initial number of threads created at startup

Returns

Returns OK if the proxy configuration was changed. Otherwise, it returns an error.

Use [rladmin info proxy]({{< relref "/operate/rs/references/cli-utilities/rladmin/info#info-proxy" >}}) to verify the proxy configuration was changed.

Example

sh
$ rladmin tune proxy 2 scale_threshold 75
Configuring proxies:
  - proxy:2: ok
$ rladmin info proxy 2 | grep scale_threshold
    scale_threshold: 75 (%)