Bandwidth between the primary and standby tenants can be a scarce resource in certain business scenarios, such as cross-region disaster recovery scenarios. It is necessary to use this resource efficiently and apply appropriate bandwidth limitations.
OceanBase Database provides the following two cluster-level parameters for bandwidth limitation on standby tenants:
standby_fetch_log_bandwidth_limit: Used to set the total bandwidth available for log synchronization from the primary or source tenant to the standby tenant, in the cluster where the standby tenant is located. The value range of this parameter is [0, 10000G]. The default value is0, which means no bandwidth limit. Any modifications to this parameter take effect immediately.After the
standby_fetch_log_bandwidth_limitparameter is modified, OceanBase Database uses an adaptive allocation policy to distribute suitable upper limit values for available bandwidth among multiple OBServer nodes in the cluster. This ensures maximum utilization of the available bandwidth resources._server_standby_fetch_log_bandwidth_limit: Used to set the bandwidth available for log synchronization from the primary or source tenant to the standby tenant, for a single OBServer node in the cluster where the standby tenant is located. The value range of this parameter is [0, 1000G]. The default value is0, which means no server-level bandwidth limit. Instead, it uses the bandwidth allocated based on thestandby_fetch_log_ratelimitparameter. Any modifications to the_server_standby_fetch_log_bandwidth_limitparameter take effect immediately.After the
_server_standby_fetch_log_bandwidth_limitparameter is modified, the OBServer nodes that have been limited will use this bandwidth limit value, and the bandwidth limit value specified bystandby_fetch_log_bandwidth_limitwill be allocated to the remaining OBServer nodes. In other words, if bothstandby_fetch_log_bandwidth_limitand_server_standby_fetch_log_bandwidth_limitare set, the total bandwidth available for the cluster is the sum of the two.
Considerations
It is not recommended to set the bandwidth limit for a standby tenant too small. In a production environment, it is necessary to evaluate the potential impact of setting bandwidth limit on your business, such as continuous lagging or log interruption of the standby tenant.
In OceanBase Database, parameters starting with an underscore (_) are called hidden parameters, which are only intended for use by developers during troubleshooting or emergency maintenance.
Procedure
Log in to the
systenant of the cluster where the standby tenant is located, using therootuser.Set the bandwidth limit for the standby tenant.
Execute the following statement to specify the total bandwidth available for the cluster:
ALTER SYSTEM [SET] standby_fetch_log_bandwidth_limit = value;Here is an example:
ALTER SYSTEM SET standby_fetch_log_bandwidth_limit = '50M';Execute the following statement to specify the bandwidth available for a single OBServer node:
ALTER SYSTEM [SET] _server_standby_fetch_log_bandwidth_limit = value SERVER [=] 'svr_ip:svr_port';where
svr_ip: indicates the IP address of the target OBServer node.svr_port: indicates the RPC port number of the target OBServer node.- Only one OBServer node can be specified.
Here is an example:
ALTER SYSTEM SET _server_standby_fetch_log_bandwidth_limit = '30M' SERVER = 'xx.xx.xx.xx:17854';