This topic describes how to change the values of the global parameters in the config.xml file of an ApsaraDB for ClickHouse cluster.
Background information
Several parameters can be configured for an ApsaraDB for ClickHouse cluster. The default parameter values are set in the config.xml file and the user.xml file. You can improve the performance of an ApsaraDB for ClickHouse cluster by changing the parameter values in the configuration files.
If you want to change the parameter values in the user.xml file, you can run the
set global
command. After the parameter values are changed, you do not need to restart the cluster to make the changes take effect. For more information, see Configure parameters in the user.xml file.If you want to change the parameter values in the config.xml file, you can change the parameter values in the ApsaraDB for ClickHouse console. For more information, see the "Change the parameter values" section of this topic.
Usage notes
If the cluster is of Community-compatible Edition, you can change the parameter values in XML mode and view the change history only when the cluster is created after December 1, 2021.
If the cluster is of Enterprise Edition, you cannot change the parameter values in XML mode.
In XML mode, parameters cannot be deleted. The XML mode and the default mode support the same configuration parameters.
After you change the parameter values that require a cluster restart to take effect, the system automatically restarts the cluster to apply the changes. Before you submit the modified parameters, make sure that the restart of the cluster does not affect your business.
Impacts
If the state of an ApsaraDB for ClickHouse cluster is Changing Configurations, you can only view the cluster information, but cannot perform operations such as upgrade, scale-out, or scale-in.
Change the parameter values
The operations to modify parameters vary based on the cluster edition.
If you want to change the value of the prometheus.port or text_log parameter, make sure that you read Important parameters.
Enterprise Edition
Log on to the ApsaraDB for ClickHouse console.
In the upper-left corner, select the region where the cluster that you want to manage is deployed.
On the Clusters page, click the Enterprise Edition Clusters tab and click the ID of the cluster that you want to manage.
In the left-side navigation pane, click Parameter Management.
Find the parameter that you want to modify and click the
icon in the Parameter Value column. In the box that appears, enter a value in the specified value range, and click OK to finish the modification or click Cancel to cancel the modification.
After you modify the required parameters, click Submit Parameters in the upper-right corner.
In the Save Settings dialog box, review the values of the parameters before and after the modification, confirm the modification, specify the reason for the modification, and then click Submit Parameters.
ImportantAfter you change the parameter values that require a cluster restart to take effect, the system automatically restarts the cluster to apply these changes. Before you submit the changed parameter values, make sure that the restart of the cluster does not affect your business.
After you submit the changed parameter values, ApsaraDB for ClickHouse automatically verifies the parameter values. If a parameter value is invalid, an error message is returned. An error code of 102 indicates an invalid parameter value. In this case, change the parameter value to a value within the specified value range and submit all the changed parameter values again.
Community-compatible Edition
Log on to the ApsaraDB for ClickHouse console.
In the upper-left corner, select the region where the cluster that you want to manage is deployed.
On the Clusters page, click the Clusters of Community-compatible Edition tab and click the ID of the cluster that you want to manage.
In the left-side navigation pane, click Parameter Configuration.
On the page that appears, click the Settings tab. Select Default Mode or XML Mode and change the parameter value.
ImportantWhen you configure the prometheus.port parameter in the ApsaraDB for ClickHouse console, you can only specify a value ranging from 2182 to 3000.
If you select Default Mode, find the parameter that you want to modify and click the
icon in the Parameter Value column. In the box that appears, enter a value in the specified value range, and click OK to finish the modification or click Cancel to cancel the modification.
In XML mode, click Edit in the upper-right corner to modify the parameters.
(Optional) In the upper-right corner of the page, select Show Modified Parameters Only. Only the parameters whose values are changed but not submitted are displayed.
After you finish changing the parameter values, click Submit Parameters in the upper-right corner of the page.
In the Save Settings dialog box, review the values of the parameters before and after the modification, confirm the modification, specify the reason for the change, and then click Submit Parameters.
ImportantAfter you change the parameter values that require a cluster restart to take effect, the system automatically restarts the cluster to apply these changes. Before you submit the changed parameter values, make sure that the restart of the cluster does not affect your business.
After you submit the changed parameter values, ApsaraDB for ClickHouse automatically verifies the parameter values. If a parameter value is invalid, an error message is returned. An error code of 102 indicates an invalid parameter value. In this case, change the parameter value to a value within the specified value range and submit all the changed parameter values again.
Cancel parameter value changes
Only the parameter value changes that are not submitted can be canceled.
If you want to cancel parameter value changes in a Community-compatible Edition cluster in XML mode or an Enterprise Edition cluster, you must cancel all the parameter value changes.
To cancel parameter value changes, perform the following operations before you submit the changed parameter values:
To cancel the change of a single parameter value, click the
icon next to the parameter value. ApsaraDB for ClickHouse cancels the change of the single parameter value that is not submitted. The original parameter value is displayed.
To cancel all the changes of parameter values, click Cancel in the upper-right corner of the parameter list. ApsaraDB for ClickHouse cancels all the changes of parameter values that are not submitted. The original parameter values are displayed.
View the change history of parameters
Log on to the ApsaraDB for ClickHouse console.
In the top navigation bar, select the region where the cluster that you want to manage is deployed.
On the Clusters page, click the tab corresponding to the required cluster edition, find the cluster that you want to manage, and then click the ID of the cluster.
If the cluster is of Enterprise Edition, click the Enterprise Edition Cluster tab.
If the cluster is of Community-compatible Edition, click the Clusters of Community-compatible Edition tab.
In the left-side navigation pane, choose Parameter Configuration or Parameter Management.
On the Parameter Configuration or Parameter Management page, click the Change History tab and view the change history by using one of the following methods:
Click Last 30 Days or Last 7 Days to view the change history in the previous 30 or 7 days.
Specify the start time and end time, and click OK to view the change history within the specified time range.
Key parameters
When you configure the prometheus.port parameter in the ApsaraDB for ClickHouse console, you can only specify a value ranging from 2182 to 3000.
The text_log log is disabled for the clusters of specific editions, or the value of the text_log.level parameter is too small. If you want to view the text_log log, configure the text_log.level parameter based on your business requirements:
Parameter value
Description
Scenario
trace
The most detailed log level. The log of this level records all operations and events.
You can use the log to trace the program execution, development, and debugging processes.
debug
The log of this level contains detailed information that may be required during development, and is less verbose than the trace level. In most cases, the log records information such as function calls and variable states.
You can use the log to debug programs.
information
The log of this level records common operations and status information about a system, such as starting a service and completing a task. The log indicates that the system is running as expected and no errors occur.
None.
warning
The log of this level indicates a potential issue or non-fatal error. The system is running as expected, but you need to pay attention to potential issues.
You can use the log to monitor a system and analyze potential issues to optimize the system.
error
The log of this level indicates that an error occurred in the system, which has affected some features or operations of the system. The system is running as expected, but you need to pay attention to and handle the errors at the earliest opportunity.
You can use the log to monitor a system and analyze the error that occurred to resolve issues.