Help Center > > User Guide> Managing DCS Instances> Modifying Configuration Parameters

Modifying Configuration Parameters

Updated at: Dec 14, 2019 GMT+08:00

On the DCS console, you can configure parameters for an instance to achieve optimal DCS performance.

Prerequisites

You can modify the parameters of single-node and master/standby DCS instances in the Running state and cannot modify those of Proxy Cluster or Redis Cluster DCS instances.

Procedure

  1. Log in to the DCS console.
  2. Click in the upper left corner of the management console and select a region and a project.
  3. In the navigation pane, choose Cache Manager.
  4. On the Cache Manager page, click the name of the DCS instance you want to configure.
  5. On the instance details page, click the Parameters tab.
  6. On the Parameters tab page, click Modify.
  7. Modify parameters based on your requirements.

    Table 1 describes the parameters. In most cases, default values are retained.

    Table 1 DCS instance configuration parameters

    Parameter

    Cache Engine

    Description

    Value Range

    Default Value

    timeout

    Redis and Memcached

    Connection between the client and server (DCS instance) will be closed if the client is idle for the timeout period (measured in seconds). A timeout period of 0 seconds indicates that the timeout function is disabled.

    0–7200 seconds

    0

    maxmemory-policy

    Redis and Memcached

    The policy applied when the maxmemory limit is reached.

    For more information about this parameter, see https://redis.io/topics/lru-cache.

    volatile-lru

    allkeys-lru

    volatile-random

    allkeys-random

    volatile-ttl

    noeviction

    noeviction

    hash-max-ziplist-entries

    Redis

    The maximum number of hashes that can be encoded using ziplist, a data structure optimized to reduce memory use.

    1–10,000

    512

    hash-max-ziplist-value

    Redis

    The largest value allowed for a hash encoded using ziplist, a special data structure optimized for memory use.

    1–10,000

    64

    list-max-ziplist-entries

    Redis

    The maximum number of list entries allowed before they are encoded using ziplist, a data structure optimized for memory use.

    1–10,000

    512

    list-max-ziplist-value

    Redis

    The largest value allowed for a list encoded using ziplist, a special data structure optimized for memory use.

    1–10,000

    64

    set-max-intset-entries

    Redis

    If a set is composed entirely of strings that are integers in radix 10 within the range of 64 bit signed integers, the set is encoded using intset, a data structure optimized for memory use.

    1–10,000

    512

    zset-max-ziplist-entries

    Redis

    The maximum number of sorted sets that can be encoded using ziplist, a data structure optimized to reduce memory use.

    1–10,000

    128

    zset-max-ziplist-value

    Redis

    The largest value allowed for a sorted set encoded using ziplist, a special data structure optimized for memory use.

    1–10,000

    64

    latency-monitor-threshold

    Redis

    The minimum amount of latency that will be logged as latency spikes

    • Set to 0: Latency monitoring is disabled.
    • Set to more than 0: All with at least this many ms of latency will be logged.

    By running the LATENCY command, you can perform operations related to latency monitoring, such as obtaining statistical data, and configuring and enabling latency monitoring. For more information about the latency-monitor-threshold, visit https://redis.io/topics/latency-monitor.

    0–86,400,000 ms

    0

    reserved-memory

    Redis

    This parameter is configurable only for master/standby instances.

    The reserved memory is allocated to the VM where the instance is located. This ensures that the DCS instance background process has sufficient memory when performing tasks such as persistence and master/standby synchronization.

    The reserved memory size can be increased or decreased, but cannot exceed the available memory of the instance and 50% of the maximum available memory. For more information about maximum available memory of each instance type, see Distributed Cache Service Product Introduction.

    0% to 50% of maximum memory space initially available to the instance and below the current free memory space. For details, see prompts. Unit: MB.

    0

    notify-keyspace-events

    Redis

    Controls which keyspace events notifications are enabled for. If this parameter is configured, the Redis Pub/Sub feature will allow clients to receive an event notification when a Redis data set is modified.

    A string of different values can be used to enable notifications for multiple event types: Possible values include:

    K: Keyspace events, published with the __keyspace@__ prefix

    E: Keyevent events, published with __keyevent@__ prefix

    g: Generic commands (non-type specific) such as DEL, EXPIRE, and RENAME

    $: 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 from maxmemory)

    For more information, see the following note.

    Ex

    NOTE:
    1. For more information about the parameters described in Table 1, visit https://redis.io/topics/memory-optimization.
    2. The latency-monitor-threshold parameter is usually used for fault location. After locating faults based on the latency information collected, change the value of latency-monitor-threshold to 0 to avoid unnecessary latency.
    3. More about the notify-keyspace-events parameter:
      • The parameter setting must contain at least a K or E.
      • A is an alias for "g$lshzxe" and cannot be used together with any of the characters in "g$lshzxe".
      • For example, the value Kl means that Redis will notify Pub/Sub clients about keyspace events and list commands. The value AKE means Redis will notify Pub/Sub clients about all events.

  8. After you have finished setting the parameters, click Save.
  9. Click Yes to confirm the modification.

Modifying Instance Configuration Parameters Using APIs

You can also call an API to modify the instance configuration parameters. For details, see the following API reference.

Modifying DCS Instance Configurations

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel