# Modifying TiDB Cluster Parameters

__*TiDB cluster configuration scope*__
__*TiDB cluster variable scope*__
__*TiDB cluster configuration modify*__
__*Modifying TiDB cluster variables*__

+ Step 1: Open the cluster's configuration file in edit mode.
  + `tiup cluster edit-config ${cluster-name}`

+ Step 2: Set parameters.
```
server_configs:
  tidb:
    log.slow-threshold: 300
```
```
tidb_servers:
- host: 10.0.1.11
    port: 4000
    config:
        log.slow-threshold: 300
```
+ Step 3: Execute the reload command to roll out the configuration and restart the corresponding components:
  + `tiup cluster reload ${cluster-name} [-N <nodes>] [-R <roles>]`

-------------------------------------------------------------
For parameters stored in the TIDB-Server, TikV-Server, and PD configuration files, if you want to persist after modify. Then we need to use tiup edit-config and tiup reload to do it.

Step 1: Open the cluster's configuration file in edit mode.
tiup cluster edit-config $ {cluster-name}

Step 2: Set parameters.
First, determine whether the configuration will take effect on all nodes or on the specified nodes. There are two effective range:

- If the effective range of the configuration is to all nodes of the component, configure it to server_configs. For example:
server_configs:
  tidb:
    log.slow-threshold: 300

If the effective range of the configuration is a node, it is configured in the config of the specific node. For example:
tidb_servers:
- host: 10.0.1.11
    port: 4000
    config:
        log.slow-threshold: 300

Configuration Item Hierarchy Use. display.

Step 3: Execute the reload command to roll out the configuration and restart the corresponding components:
tiup cluster reload $ {cluster-name} [-N<nodes>] [-R<roles>]