Bandwidth between a primary tenant and a standby tenant is limited in some business scenarios such as cross-region disaster recovery. You must use the bandwidth properly and enable throttling as needed.
OceanBase Database provides two cluster-level parameters for you to control throttling for a standby tenant.
standby_fetch_log_bandwidth_limit: the total bandwidth available for the standby tenant to synchronize logs from the primary or source tenant in the cluster where the standby tenant resides. The value range of this parameter is [0,10000G]. The default value is0, which specifies not to limit the bandwidth. This parameter takes effect immediately after it is modified.After you modify the
standby_fetch_log_bandwidth_limitparameter, OceanBase Database follows a set of adaptive allocation policies to allocate the maximum bandwidth available for a single OBServer node among multiple OBServer nodes in the cluster. This maximizes the utilization of the bandwidth._server_standby_fetch_log_bandwidth_limit: the bandwidth available for the standby tenant to synchronize logs from the primary or source tenant on a single OBServer node in the cluster where the standby tenant resides. The value range of this parameter is [0,1000G]. The default value is0, which specifies to use the bandwidth allocated based on thestandby_fetch_log_ratelimitparameter without server-level throttling. This parameter takes effect immediately after it is modified.After you modify the
_server_standby_fetch_log_bandwidth_limitparameter, the throttled OBServer node uses the specified bandwidth limit, and the bandwidth limit is also allocated to other OBServer nodes. In other words, if you specify both thestandby_fetch_log_bandwidth_limitand_server_standby_fetch_log_bandwidth_limitparameters, the total bandwidth available for the cluster is the sum of the values of the parameters.
Considerations
We recommend that you do not set the bandwidth limit for a standby tenant to be excessively small. In the production environment, you must assess possible impact of throttling on your business. For example, throttling for a standby tenant can cause lagging or log interruption of the standby tenant.
In OceanBase Database, the name of a hidden parameter begins with an underscore (_). Hidden parameters are used by developers only for troubleshooting or emergency O&M.
Procedure
Log on to the
systenant of the cluster where the standby tenant resides as therootuser.Specify a 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;For 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';The parameters are described as follows:
svr_ip: the IP address of the OBServer node.svr_port: the RPC port number of the OBServer node.- You can specify only one OBServer node.
For example:
ALTER SYSTEM SET _server_standby_fetch_log_bandwidth_limit = '30M' SERVER = 'xx.xx.xx.xx:17854';