When you perform scaling operations by adding or removing storage nodes, the system automatically triggers a data rebalancing task. This task consumes CPU and I/O resources on storage nodes and can degrade the performance of your business applications. To avoid performance degradation during peak hours, PolarDB-X lets you configure a maintenance window to schedule data rebalancing tasks for off-peak periods.
Prerequisites
-
Your instance version must be 5.4.18-17152226 or later.
-
This feature is available only for Enterprise Edition instances.
-
For information about the instance version naming rules, see Release notes.
-
For information about how to view the version of an instance, see View and update the engine version of a PolarDB for Xscale instance.
Procedure
-
Log on to the PolarDB-X console.
-
In the top navigation bar, select the region where the instance is deployed.
-
On the Instances page, click the PolarDB-X 2.0 tab.
-
Find the instance that you want to manage and click its ID.
-
In the left-side navigation pane, click . Set the compute layer parameters
REBALANCE_MAINTENANCE_TIME_STARTandREBALANCE_MAINTENANCE_TIME_END.Parameter descriptions:
Parameter
Description
REBALANCE_MAINTENANCE_TIME_START
Specifies the start time of the maintenance window for data rebalancing, in 24-hour format (HH:mm). Default value:
00:00. Any pending or paused data rebalancing task starts or resumes at this time.REBALANCE_MAINTENANCE_TIME_END
Specifies the end time of the maintenance window for data rebalancing, in 24-hour format (HH:mm). Default value:
00:00. A data rebalancing task still running at this time is automatically paused and will resume during the next maintenance window.Important-
Parameter changes take effect immediately.
-
The system automatically splits a data rebalancing task into multiple subtasks based on the data volume. The maintenance window must be longer than the execution time of a subtask. Otherwise, a subtask might be repeatedly restarted but never complete, impeding the overall task progress. As a guideline, we recommend a maintenance window longer than 5 hours. If you have questions about setting the maintenance window duration, you can contact us.
-
After you set the parameters, if a data rebalancing task is running and the current time is outside the newly configured window, the task is immediately paused. It will resume during the next scheduled maintenance window.
-
If
REBALANCE_MAINTENANCE_TIME_STARTis earlier thanREBALANCE_MAINTENANCE_TIME_END, the maintenance window is fromREBALANCE_MAINTENANCE_TIME_STARTtoREBALANCE_MAINTENANCE_TIME_ENDon the same day. -
If
REBALANCE_MAINTENANCE_TIME_STARTis later thanREBALANCE_MAINTENANCE_TIME_END, the maintenance window spans fromREBALANCE_MAINTENANCE_TIME_STARTon the current day toREBALANCE_MAINTENANCE_TIME_ENDon the following day. -
If
REBALANCE_MAINTENANCE_TIME_STARTis the same asREBALANCE_MAINTENANCE_TIME_END, the maintenance window feature is disabled. In this case, after you add or remove a storage node, the data rebalancing task starts immediately, regardless of the business workload, and runs until completion.
-