Changing ClickHouse cluster settings
After creating a cluster, you can:
-
Configure the ClickHouse servers according to the ClickHouse documentation
. -
Move a cluster to another folder.
Changing the host class
Host class affects the amount of RAM that ClickHouse can use. For more information, see Memory management.
The minimum number of cores per ZooKeeper host depends on the total number of cores on ClickHouse hosts. To learn more, see Replication.
- In the management console
, go to the folder page and select Managed Service for ClickHouse. - Select the cluster and click Edit cluster in the top panel.
- To change the ClickHouse host class, select the platform, VM type, and required host class under Resources.
- To change the ZooKeeper host class, select the platform, VM type, and required ZooKeeper host class under ZooKeeper host class.
- Click Save changes.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change the host class for the cluster:
-
View a description of the update cluster CLI command:
ncp managed-clickhouse cluster update --help
-
Request a list of available host classes (the
ZONES
column specifies the availability zones where you can select the appropriate class):ncp managed-clickhouse resource-preset list
Result:
+----------+-------------+-------+----------+ | ID | ZONE IDS | CORES | MEMORY | +----------+-------------+-------+----------+ | s3-c2-m8 | eu-north1-c | 2 | 8.0 GB | | ... | +----------+-------------+-------+----------+
-
Specify the class in the update cluster command:
ncp managed-clickhouse cluster update <cluster name> \ --clickhouse-resource-preset <class ID>
Managed Service for ClickHouse will run the update host class command for the cluster.
-
To change the class of a ZooKeeper host, provide the value you need in the
--zookeeper-resource-preset
parameter.
Increasing storage size
Make sure the cloud has enough quota to increase the storage size. Open the cloud's quotas page in the management console and make sure there is space available under Managed Databases in the SSD storage capacity line.
To increase the cluster storage size:
- In the management console
, go to the folder page and select Managed Service for ClickHouse. - Select the cluster and click Edit cluster in the top panel.
- Under Size of storage, specify the required value.
- Click Save changes.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To increase the cluster storage size:
-
View a description of the update cluster CLI command:
ncp managed-clickhouse cluster update --help
-
Specify the required storage in the cluster update command (it must be at least as large as
disk_size
in the cluster properties):ncp managed-clickhouse cluster update <cluster name or ID> \ --clickhouse-disk-size <storage size in GB>
-
To increase the storage capacity of ZooKeeper hosts, provide the value you need in the
--zookeeper-disk-size
parameter.
Enabling user and database management via SQL
The Managed Service for ClickHouse service lets enable cluster user and database management via SQL.
Alert
This disables user and database management through other interfaces.
Once enabled, user and database management settings for SQL cannot be disabled.
- Go to the folder page and select Managed Service for ClickHouse.
- Select the cluster and click Edit cluster in the top panel.
- To manage users via SQL, enable the User management via SQL setting under DBMS settings and specify the
admin
user password. - To manage databases via SQL, enable the User management via SQL and Managing databases via SQL settings under DBMS settings and specify the
admin
user password. - Click Save changes.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
-
To enable SQL user management:
- set
--enable-sql-user-management
totrue
. - Set a password for the
admin
user in the--admin-password
parameter.
ncp managed-clickhouse cluster update <cluster name or ID>\ ... --enable-sql-user-management true \ --admin-password "<admin password>"
- set
-
To enable SQL database management:
- Set
--enable-sql-user-management
and--enable-sql-database-management
totrue
; - Set a password for the
admin
user in the--admin-password
parameter.
ncp managed-clickhouse cluster update <cluster name or ID>\ ... --enable-sql-user-management true \ --enable-sql-database-management true \ --admin-password "<admin password>"
- Set
Changing ClickHouse settings
Note
You can only update the value of Max server memory usage
For more information, see Memory management.
- In the management console
, go to the folder page and select Managed Service for ClickHouse. - Select the cluster and click Edit cluster in the top panel.
- Configure the ClickHouse settings by clicking Settings under DBMS settings.
- Click Save changes.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change ClickHouse server settings:
-
View the full list of settings specified for the cluster:
ncp managed-clickhouse cluster get <cluster ID or name> --full
-
View a description of the update cluster configuration CLI command:
ncp managed-clickhouse cluster update-config --help
-
Set the required parameter values:
ncp managed-clickhouse cluster update-config <cluster ID or name> \ --set <parameter1 name>=<value1>,...
Managed Service for ClickHouse runs the update cluster settings operation.
All the supported parameters are listed in the description of settings forClickHouse.
Changing additional cluster settings
-
In the management console
, go to the folder page and select Managed Service for ClickHouse. -
Select the cluster and click Edit cluster in the top panel.
-
Under Service settings, change the additional cluster settings:
-
Backup start time (UTC): UTC time in 24-hour format to start backing up the cluster. If the time is not set, the backup will start at 22:00 UTC.
-
Deletion protection: Manages cluster protection from accidental deletion by a user.
Cluster deletion protection will not prevent a manual connection to delete the contents of a database.
-
-
Click Save changes.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To change additional cluster settings:
-
View a description of the update cluster CLI command:
ncp managed-clickhouse cluster update --help
-
Run the following command with a list of settings to update:
ncp managed-clickhouse cluster update <cluster ID or name> \ --backup-window-start <backup start time> \ --deletion-protection=<cluster deletion protection: true or false>
You can change the following settings:
--backup-window-start
: The cluster backup start time, set in UTC formatHH:MM:SS
. If the time is not set, the backup will start at 22:00 UTC.
-
--deletion-protection
: Cluster protection from accidental deletion by a user.Cluster deletion protection will not prevent a manual connection to delete the contents of a database.
You can find out the cluster ID and name in the list of clusters in the folder.
Moving a cluster
- Go to the folder page and select Managed Service for ClickHouse.
- Click
- Select Move.
- Select a folder you want to move the cluster to.
- Click Move.
If you don't have the Nebius AI command line interface yet, install and initialize it.
The folder specified in the CLI profile is used by default. You can specify a different folder using the --folder-name
or --folder-id
parameter.
To move a cluster:
-
View a description of the CLI move cluster command:
ncp managed-clickhouse cluster move --help
-
Specify the destination folder in the move cluster command:
ncp managed-clickhouse cluster move <cluster ID> \ --destination-folder-name=<destination folder name>
You can get the cluster ID with a list of clusters in the folder.