OceanBase Database allows you to monitor the log synchronization status of a standby tenant in real time. If the synchronization timestamp of the standby tenant is significantly different from that of the primary tenant, the log synchronization progress of the standby tenant may lag behind that of the primary tenant. If the bandwidth between the standby tenant and the restore source is sufficient, you can modify the tenant-level log_restore_concurrency parameter to adjust the concurrency of log synchronization of the standby tenant, to improve the log synchronization performance of the standby tenant.
For more information about how to view the log synchronization status of a standby tenant, see Monitor the log synchronization status of a standby tenant.
Procedure
Log on to the database as the administrator of the
systenant or the standby tenant.Set the
log_restore_concurrencyparameter to an appropriate value.The tenant-level
log_restore_concurrencyparameter specifies the total number of worker threads for log synchronization. The modification of this parameter takes effect immediately without restarting the OBServer node. The default value of this parameter is1and the valid value ranges from [1 to 10]. If you set this parameter to a value greater than 10,10will be used instead. We recommend that you use the default value because more threads consume more memory.Notice
If the tenant is configured with 2 or 4 CPU cores, we recommend that you use the default value.
If you have configured sufficient bandwidth between the standby tenant and the restore source, you can increase the concurrency. If the restore source uses NFS, you can set the
log_restore_concurrencyparameter to5, which is sufficient for most business scenarios.Execute the following statement to set the concurrency:
Execute the following statement in a standby tenant to adjust the log synchronization performance of the current tenant:
ALTER SYSTEM SET log_restore_concurrency = 5;Execute the following statement in the
systenant to adjust the log synchronization performance of a specified tenant:ALTER SYSTEM SET log_restore_concurrency = 5 TENANT = oracle_standby;Execute the following statement in the
systenant to adjust the log synchronization performance of all tenants:ALTER SYSTEM SET log_restore_concurrency = 5 TENANT = ALL;
For more information about the
log_restore_concurrencyparameter, see log_restore_concurrency.