All Products
Search
Document Center

PolarDB:Set the data rebalancing maintenance window

Last Updated:Mar 28, 2026

When you add or remove a data node, PolarDB-X automatically starts a data rebalancing task. The task consumes CPU and I/O resources on the data node, which can degrade performance during peak hours. Use the maintenance window to restrict the task to low-traffic periods.

Prerequisites

Before you begin, ensure that you have:

How it works

PolarDB-X splits a data rebalancing task into multiple subtasks based on data volume. Each subtask must complete within a single maintenance window. If the window is shorter than the time a subtask needs, that subtask retries in every subsequent window and blocks all remaining subtasks — the overall rebalancing never finishes.

Set the maintenance window to at least 5 hours to avoid this situation. If you have questions about the appropriate window length for your workload, contact us.

Set the maintenance window

  1. Log on to the PolarDB-X console.

  2. In the top navigation bar, select the region where the instance is deployed.

  3. On the Instances page, click the PolarDB-X 2.0 tab.

  4. Find the instance and click the instance ID.

  5. In the left-side navigation pane, choose Configuration Management > Parameter Settings.

  6. Under Compute Layer, set the following parameters:

    ParameterDescriptionDefault
    REBALANCE_MAINTENANCE_TIME_STARTStart time of the maintenance window, in 24-hour clock format. If the rebalancing task is not complete when the window opens again, the task automatically resumes.00:00
    REBALANCE_MAINTENANCE_TIME_ENDEnd time of the maintenance window, in 24-hour clock format. If the rebalancing task is not complete when the window closes, the task pauses until the next window.00:00
Important

New parameter values take effect immediately. If a rebalancing task is running when you update the parameters, and the task falls outside the new window, it stops immediately and does not resume until the next maintenance window.

FAQ

What happens when the start time equals the end time?

When REBALANCE_MAINTENANCE_TIME_START equals REBALANCE_MAINTENANCE_TIME_END, no maintenance window is set. After you add or remove a data node, the rebalancing task starts immediately and runs continuously until it completes, regardless of peak hours. To prevent this, set the two parameters to different values.

Does the window span midnight?

It depends on whether the start time is earlier or later than the end time:

  • Start time is earlier than end time: The window runs from the start time to the end time on the same day. For example, 02:00 to 07:00 means the window is from 02:00 to 07:00 each day.

  • Start time is later than end time: The window spans midnight, from the start time on the current day to the end time on the next day. For example, 22:00 to 04:00 means the window runs from 22:00 to 04:00 the following morning.

What's next