OceanBase Database provides cluster-level and tenant-level parameters. You can set these parameters to control the load balancing, major compaction time, major compaction mode, resource allocation, and module switches of a cluster.
Effective mode
Parameters generally take effect dynamically or upon the restart of the OBServer node. Most parameters take effect dynamically without a need to restart the OBServer node.
Parameters
OceanBase Database provides cluster-level and tenant-level parameters.
You can use the following method to query whether a parameter is a cluster-level or tenant-level parameter:
obclient> SHOW PARAMETERS LIKE 'max_syslog_file_count';
+-------+----------+----------------+----------+-----------------------+-----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone | svr_type | svr_ip | svr_port | name | data_type | value | info | section | scope | source | edit_level |
+-------+----------+----------------+----------+-----------------------+-----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
| zone2 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone2 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone3 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone1 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
| zone1 | observer | xx.xx.xx.xx | 2882 | max_syslog_file_count | NULL | 0 | specifies the maximum number of the log files that can co-exist before the log file recycling kicks in. Each log file can occupy at most 256MB disk space. When this value is set to 0, no log file will be removed. Range: [0, +∞) in integer | OBSERVER | CLUSTER | DEFAULT | DYNAMIC_EFFECTIVE |
+-------+----------+----------------+----------+-----------------------+-----------+-------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------+---------+---------+-------------------+
5 rows in set (0.02 sec)
If the value in the scope column is CLUSTER, the parameter is a cluster-level parameter. If the value in the scope column is TENANT, the parameter is a tenant-level parameter.
Comparison with system variables
| Comparison item | System parameter | System variable |
|---|---|---|
| Applicable scope | Affects a cluster, zone, server, or tenant. | Affects a tenant globally or at the session level. |
| Effective mode |
|
|
| Modification |
|
You can modify a parameter only by using SQL statements. For example,
|
| Query method | You can query a system parameter by using the SHOW PARAMETERS statement. For example, SHOW PARAMETERS LIKE 'schema_history_expire_time';. |
You can query a variable by using the SHOW [GLOBAL] VARIABLES statement. For example,
|
| Persistence | Parameters are persisted into internal tables and configuration files and can be queried from the /home/admin/oceanbase/etc/observer.config.bin and /home/admin/oceanbase/etc/observer.config.bin.history files. |
Only variables at the global level are persisted, while those at the session level are not. |
| Lifecycle | Long. A system parameter remains effective for the entire duration of a process. | Short. A system variable takes effect only after the tenant schema is created. |
More information
For more information about system parameters, see Summary of system parameters.
For information about how to view and set parameters, see Set parameters.