You can use OceanBase Cloud Platform (OCP) to manage parameters in a unified manner. For example, you can view parameters, modify parameters, and view the parameter modification history.
View cluster parameters in OCP
Note
The GUI of OCP may vary with the version. This topic takes OCP V3.1.0 as an example. For OCP of other versions, see User Guide of the corresponding version.
Log on to the OCP console. The Cluster Overview page automatically appears.
In the Clusters list on the Cluster Overview page, find the target cluster and click its name.
In the left-side navigation pane of the page that appears, click Parameter Management.
On the Parameters tab, view the name, value type, value range, default value, current value, and description of each parameter, and check whether it is effective upon a restart.
Modify cluster parameters
You can modify cluster parameters by using SQL statements or in OCP.
Modify a cluster parameter by using an SQL statement
The following example shows the syntax for modifying a parameter. If you want to modify two or more parameters at the same time, separate them with commas (,).
obclient> ALTER SYSTEM SET param_name = expr
[COMMENT 'text']
[PARAM_OPTS]
[TENANT = 'tenantname']
PARAM_OPTS:
[ZONE='zone' | SERVER='server_ip:rpc_port']
Description of parameter modification syntax:
PARAM_OPTSspecifies conditions that apply. For example, you can specify a zone or a server.ALTER SYSTEMallows you to specify either a zone or server, not both. You can specify only one zone or server at a time.A cluster-level parameter, the
scopeof which is set to Cluster, cannot be set in a user tenant or be set in the sys tenant through a user tenant. For example,ALTER SYSTEM SET memory_limit='100G' TENANT='test_tenant'will cause an error becausememory_limitis a cluster-level parameter.
Modify cluster parameters in OCP
Log on to the OCP console. The Cluster Overview page automatically appears.
In the Clusters list on the Cluster Overview page, find the target cluster and click its name.
In the left-side navigation pane of the page that appears, click Parameter Management.
Optional. In the search box of the Parameters page, enter a parameter name to perform a fuzzy search.
Find the parameter to be modified and click Change Value in the Actions column.
In the dialog box that appears, modify the value and effective scope of the parameter, and then click OK.
Parameters of an OceanBase cluster have three effective scopes: Cluster, Zone, and Server. You can select a scope as needed when you modify a parameter.
The default effective scope is Cluster. If you need to narrow the effective scope down to Zone or Server, unselect Cluster in the Effective Scope column. Then, a list of zones under the cluster appears. Select a zone as prompted. If you select a zone and further select a server under the zone, the parameter takes effect on the selected server.
If you want to apply different parameter values in different scopes, you can select Add Value in the Value column. For example, you can set the value of backup_concurrency to 10 in Zone 1, 12 in Zone 2, and 20 on Server 1. In each of the three record rows that appear, select the corresponding effective scope.
Note
If multiple rows of values are displayed after you click Add Value, modify the parameter values from the top down. For each successful modification operation, a record is generated on the Change History tab.
Cluster parameters
| Parameter | Description | Recommended value |
|---|---|---|
| cpu_quota_concurrency | The maximum concurrency allowed for each CPU quota of a tenant. Value range: [1, 10]. | 5 |
| memory_limit_percentage | The percentage of the total available memory to the total memory of the system. Value range: [10, 90]. | 80 |
| server_permanent_offline_time | The timeout period for a server. If no heartbeat message is sent from a server within the period, the server is considered permanently offline. Data replicas on a permanently offline server need to be automatically supplemented. Value range: [20s, +∞). | 7200s |
| clog_sync_time_warn_threshold | The warning threshold of the transaction log synchronization duration. If the synchronization duration exceeds this threshold, a WARN log is generated. Value range: [1 ms, 10000 ms]. | 1s |
| large_query_threshold | The threshold of the query execution duration. A request may be suspended if its execution time exceeds this threshold. A suspended request is considered a large query and is processed by following the large query scheduling strategy. Value range: [1 ms, +∞). | 5s |
| resource_soft_limit | Specifies whether to enable resource unit balancing. If the value of resource_soft_limit is smaller than 100, resource unit balancing is enabled. If the value of resource_soft_limit is larger than or equal to 100, resource unit balancing is disabled. Value range: [1, 10000]. | 100 |
| trace_log_slow_query_watermark | The threshold of the query execution duration. A query whose execution duration exceeds this threshold is considered a slow query. Trace logs of slow queries are written to system logs. Value range: [1 ms, +∞). | 1s |
| autoinc_cache_refresh_interval | The refresh interval for the auto-increment column cache. Value range: [100 ms, + ∞). | 4200s |
| trx_try_wait_lock_timeout | The maximum amount of time that a statement waits for a locked row to be unlocked. Value range: [0 ms, 100 ms]. | 0 ms |
| enable_merge_by_turn | Specifies whether to enable rotating major compaction. Valid values: True and False. | True |
| default_compress_func | The default algorithm for compressing table data. You can also specify another compression algorithm when you create a table. Valid values: none, lz4-1.0, snappy-1.0, zlib-1.0, zstd-1.0, and zstd-1.3.8. | zstd_1.0 |
| syslog_io_bandwidth_limit | The maximum I/O bandwidth available for system logs. If this value is reached, the remaining system logs are discarded. | 5 MB |
| minor_freeze_times | The number of minor compactions for triggering a global major compaction. If the value is 0, minor compaction is disabled. Value range: [0, 65535]. |
150 |
| merge_thread_count | The number of worker threads for a daily compaction. Value range: [0, 256]. | 0 |
| minor_merge_concurrency | The number of concurrent threads for a minor compaction. Value range: [0, 64]. | 0 |
| memstore_limit_percentage | The percentage of the memory occupied by the MEMStore to the total available memory of a tenant. Value range: [1, 99]. | 50 |
| freeze_trigger_percentage | The threshold of memory used by tenants for triggering a global freeze. Value range: [1, 99]. | 70 |
| system_memory | The memory size reserved by the system for the sys500 tenant. Value range: [0 MB, +∞). |
50 GB |
| enable_manual_merge | Specifies whether to enable manual major compactions. Valid values: True and False. | False |
| resource_hard_limit | Specifies how resource units are allocated. During the allocation of resources such as CPU cores and memory, the total resource volume is the actual volume multiplied by the specified value in percentage. The final server resource usage cannot exceed the value of resource_hard_limit. Value range: [1, 10000]. |
100 |
| syslog_level | The generation level of system logs. Valid values: DEBUG, TRACE, WDIAG, EDIAG, INFO, WARN, and ERROR. | INFO|info |
| max_kept_major_version_number | The number of frozen versions to be retained. Value range: [1, 16]. | 1 |
| data_disk_usage_limit_percentage | The maximum usage of the data disk. When the usage exceeds this threshold, data can no longer be migrated into the data disk. Value range: [50, 100]. | 95 |
| enable_perf_event | Specifies whether to enable the information collection feature for performance events. Valid values: True and False. | True |
| enable_sql_audit | Specifies whether to enable SQL audit. Valid values: True and False. | True |