tencent cloud

Feedback

Setting Instance Parameters

Last updated: 2023-03-14 15:49:33
    This document describes how to configure instance parameters in the TencentDB for Redis console.

    Overview

    You can view and modify certain instance parameters and query parameter modification logs in the TencentDB for Redis console.
    Notes
    To ensure instance stability, only some parameters can be modified in the console. These parameters are displayed on the Parameter Settings page.

    Editing Parameters

    Editing one parameter

    1. Log in to the TencentDB for Redis console.
    2. Above the instance list, select the region.
    3. In the instance list, click the instance ID to enter the Instance Details page.
    4. On the Instance Details page, select the Parameter Settings tab.
    5. Select the target parameter, hover over the parameter value in the Current Value column, and click
    
    to modify the parameter value.
    6. Modify the value within the restrictions stated in the Acceptable Values column and click
    
    to save the modification. You can click
    
    to cancel the operation.

    Editing parameters in batches

    1. Log in to the TencentDB for Redis console.
    2. Above the instance list, select the region.
    3. Click the ID of the target instance in the instance list and enter the Instance Details page.
    4. Select the Parameter Settings tab and click Modify Current Value.
    5. Find the target parameters and modify their values in the Current Value column. After confirming that everything is correct, click OK.

    Importing a parameter template into the current instance

    1. Log in to the TencentDB for Redis console.
    2. Above the instance list, select the region.
    3. In the instance list, click the instance ID to enter the Instance Details page.
    4. Select the Parameter Settings tab and click Import from Template.
    5. In the Import from Parameter Template window, select a created parameter template in the drop-down list after Select Parameter Template.
    6. Click Import and Overwrite Original Parameters, and all parameters of the current instance will be configured according to the parameter values in the template.

    Exporting the Parameters of an instance

    1. Log in to the TencentDB for Redis console.
    2. Above the instance list, select the region.
    3. In the instance list, click the instance ID to enter the Instance Details page.
    4. Select the Parameter Settings tab and click Export Parameters.
    5. You can see the exported parameter file at the bottom of the page, which can be opened and viewed locally.

    Saving Parameters as a Template

    You can save the existing parameters of the current instance as a fixed template, so that these parameters can be easily applied to other instances.
    1. Log in to the TencentDB for Redis console.
    2. Above the instance list, select the region.
    3. In the instance list, click the instance ID to enter the Instance Details page.
    4. Select the Parameter Settings tab and click Save as Template.
    5. In the Save as Parameter Template window, set Template Name and Template Description as prompted.
    6. Click Create and Save.

    Viewing Parameter Modification Logs

    1. Log in to the TencentDB for Redis console.
    2. Above the instance list, select the region.
    3. In the instance list, click the instance ID to enter the Instance Details page.
    4. View the parameter modification logs on the Parameter Settings > Modification Log tab.

    Supported Custom Parameters

    Parameter
    Description
    Supported Versions
    disable-command-list
    Disable commands that have high time complexity or high risks. The disabled commands will not be allowed to run in this instance. To disable multiple commands, separate them by comma, such as flushdb,keys.
    Redis 2.8, 4.0, 5.0
    maxmemory-policy
    Select one of the following eviction policies used to evict data when the Redis in-memory cache was used up.
    volatile-lru: Evict keys that have the TTL set by trying to remove the LRU keys first.
    allkeys-lru: Evict keys by trying to remove the LRU keys first.
    volatile-random: Randomly evict keys with the TTL set.
    allkeys-random: Randomly evict keys.
    volatile-ttl: Evict keys with the TTL set, and try to evict keys with a shorter TTL first.
    noeviction: Do not evict keys but return errors when the memory limit was reached.
    LRU (least recently used) and TTL (time to live) are implemented by randomized and approximation algorithms.
    Redis 2.8, 4.0, 5.0
    cluster-node-timeout
    Set the timeout threshold for a cluster node. If a cluster node remains unreachable longer than the threshold, it will be deemed as a failed node.
    Redis 4.0, 5.0
    hash-max-ziplist-entries
    Hashes that meet both of the following conditions will be encoded as ziplist.
    The biggest hash entry is smaller than the value (in bytes) of hash-max-ziplist-value.
    The number of hash entries is smaller than the value of hash-max-ziplist-entries.
    Redis 2.8, 4.0, 5.0
    hash-max-ziplist-value
    Hashes that meet both of the following conditions will be encoded as ziplist.
    The biggest hash entry is smaller than the value (in bytes) of hash-max-ziplist-value.
    The number of hash entries is smaller than the value of hash-max-ziplist-entries.
    Redis 2.8, 4.0, 5.0
    proxy-slowlog-log-slower-than
    Set the proxy slow log threshold (in milliseconds). In the proxy, queries that are executed longer than the threshold will be logged.
    Redis 2.8, 4.0, 5.0
    set-max-intset-entries
    Sets that meet both of the following conditions will be encoded as intset.
    All set members are composed of just strings.
    All set members can be interpreted as base-10 integers within the range of 64-bit signed integers.
    Redis 2.8, 4.0, 5.0
    slowlog-log-slower-than
    Set the slow log threshold (in milliseconds). Queries that are executed longer than the threshold will be logged.
    Redis 2.8, 4.0, 5.0
    timeout
    Set the timeout threshold (in seconds) for connections. Client connections that remain idle longer than the threshold will be closed.
    Redis 2.8, 4.0, 5.0
    zset-max-ziplist-entries
    Sorted sets that meet both of the following conditions will be encoded as ziplist.
    The biggest sorted set element is smaller than the value (in bytes) of zset-max-ziplist-value.
    The number of sorted set elements is smaller than the value of zset-max-ziplist-entries.
    Redis 2.8, 4.0, 5.0
    zset-max-ziplist-value
    Sorted sets that meet both of the following conditions will be encoded as ziplist.
    The biggest sorted set element is smaller than the value (in bytes) of zset-max-ziplist-value.
    The number of sorted set elements is smaller than the value of zset-max-ziplist-entries.
    Redis 2.8, 4.0, 5.0
    notify-keyspace-events
    Specify the type of notifications sent by the server. The value of this parameter is composed of multiple characters listed as follows:
    Character: Notification type
    >K: Keyspace events, published with __keyspace@<db>__ prefix.
    E: Keyevent events, published with __keyevent@<db>__ prefix.
    g: Generic commands (non-type specific) like DEL, EXPIRE, RENAME, etc.
    $: String commands
    l: List commands
    s: Set commands
    h: Hash commands
    z: Sorted set commands
    x: Expired events (events generated every time a key expires)
    e: Evicted events (events generated when a key is evicted for maxmemory)
    A: Alias for g$lshzxe. Enabling keyspace event notifications consumes CPU resources, so this type of notification is disabled by default. To configure the server to send notifications, the parameter value must include K or E. For example, to subscribe to evicted event notifications of the keyevent events, set the parameter to Ee; to subscribe to all types of notifications, set the parameter to AKE.
    Redis 2.8, 4.0, 5.0
    list-max-ziplist-entries
    Lists that meet both of the following conditions will be encoded as ziplist.
    The biggest list element is smaller than the value (in bytes) of list-max-ziplist-value.
    The number of list elements is smaller than the value of list-max-ziplist-entries.
    Redis 2.8
    list-max-ziplist-value
    Lists that meet both of the following conditions will be encoded as ziplist.
    The biggest list element is smaller than the value (in bytes) of list-max-ziplist-value.
    The number of list elements is smaller than the value of list-max-ziplist-entries.
    Redis 2.8

    Related APIs

    API
    Description
    Applies a parameter template
    Creates a parameter template
    Deletes a parameter template
    Queries the list of parameter modifications
    Queries the list of parameter templates
    Modifies the parameters of an instance
    Modifies a parameter template
    
    Contact Us

    Contact our sales team or business advisors to help your business.

    Technical Support

    Open a ticket if you're looking for further assistance. Our Ticket is 7x24 avaliable.

    7x24 Phone Support