This topic describes how to modify global parameters in the config.xml configuration file of an ApsaraDB for ClickHouse cluster.

Background information

Several parameters are configured for an ApsaraDB for ClickHouse cluster. The default values of the parameters are configured in the config.xml and user.xml configuration files. You can modify global parameters to optimize the cluster performance.
  • You can run the set global command to modify global parameters in the user.xml configuration file. You do not need to restart the cluster to make the configurations take effect. For more information, see Modify parameters in the user. xml file.
  • You can modify parameters in the config.xml configuration file online by using the ApsaraDB for ClickHouse console. In this case, you must restart the cluster to make the configurations take effect. The following table describes the parameters that you can modify based on the frequency of modifications and stability of the cluster.
    Parameter Default value Valid value Restart required Description
    max_concurrent_queries 100 >0 Yes The maximum number of requests that can be simultaneously processed.
    max_connections 4096 >0 Yes The maximum number of connections to the cluster.
    keep_alive_timeout 3s >0 Yes The length of time for a new request to be sent to ApsaraDB for ClickHouse before the existing connection is closed. Unit: seconds.
    max_table_size_to_drop 50*1024*1024(byte)53687091200 >0 Yes If the size of a MergeTree table exceeds the max_table_size_to_drop value, you cannot use the DROP statement to delete the table. The value is measured in bytes.
    timezone Europe/Moscow Examples of valid time zone information
    • Africa/Abidjan
    • Asia/Shanghai
    • Europe/Moscow
    Yes The time zone of the cluster.
    mark_cache_size 5368709120 >=5368709120 Yes The approximate size of the cache of marks used by table engines of the MergeTree family. Unit: bytes.
    uncompressed_cache_size 8589934592 bytes >=0 Yes The cache size for uncompressed data used by table engines of the MergeTree family. Unit: bytes. One ApsaraDB for ClickHouse cluster uses specific storage space for cached data. Memory is allocated on demand. Data is cached if the use_uncompressed_cache option is enabled.

Modify parameters

  1. Use an Alibaba Cloud account to log on to the ApsaraDB for ClickHouse console.
  2. In the upper-left corner of the page, select the region where the cluster for which you want to apply for a public endpoint is deployed.
  3. On the Clusters page, click the ID of the cluster.
  4. In the left-side navigation pane, click Parameter Configuration. You can view the list of parameters.
  5. Click the 18680601 icon in the Parameter Value column that corresponds to the parameter whose value you want to change. In the dialog box that appears, enter a valid value based on the value range. Click OK. You can also click Cancel to retain the original value. 18680602
  6. Select Only the modified parameters are displayed. The parameters are not submitted. next to Parameter Value to filter parameters. The Parameter Configuration page displays only parameters that are modified but not submitted. 18680603

Cancel modifications

Notice Only parameters that are modified but not submitted can be canceled.

If you want to cancel modifications after parameters are modified, click Cancel in the upper-right corner before you submit the modifications. The ApsaraDB for ClickHouse console displays the original parameter values instead of all content that is modified but not submitted.

Submit modifications

After all parameters are modified, click Submit Parameters in the upper-right corner to submit modifications.

Note If the submitted parameters include parameters whose modifications can take effect after the cluster is restarted, ApsaraDB for ClickHouse automatically restarts the cluster after the parameters are modified. Ensure that your business is not affected after the cluster is restarted. Then, in the Modify Parameters message, click OK.

After the parameters are modified, ApsaraDB for ClickHouse verifies parameter values. If the new values of the parameters are invalid, the Error message appears. Change the parameter values to valid values and submit the modifications again.