All Products
Search
Document Center

PolarDB:Set the data rebalancing maintenance window

Last Updated:Dec 16, 2024

When you add or remove a data node, the data node automatically triggers a data balancing task. The task occupies the CPU and I/O resources of the data node, which may degrade the business performance. Therefore, PolarDB-X provides a maintenance window to help you avoid executing the data balancing task during peak hours.

Prerequisites

  • The instance version must be 5.4.18-17152226 or later.

  • Only Enterprise Edition instances support this feature.

Note

Procedure

  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 from which you want to detach the data disk and click the instance ID.

  5. In the left-side navigation pane, choose Configuration Management > Parameter Settings. On the page that appears, set Compute Layer parameters REBALANCE_MAINTENANCE_TIME_START and REBALANCE_MAINTENANCE_TIME_END.

    The following table describes the parameters.

    Parameter

    Description

    REBALANCE_MAINTENANCE_TIME_START

    The start time of data balancing, in the 24-hour clock. Default value: 00:00. If the data balancing task is not completed, it will automatically continue at this point in time.

    REBALANCE_MAINTENANCE_TIME_END

    The end time of data balancing, in the 24-hour clock. Default value: 00:00. If the data balancing task is not completed, the task is automatically suspended until the next maintenance window.

    Important
    • The new parameter values take effect in real time.

    • The data balancing task is automatically divided into multiple subtasks based on the data volume. The time window must be greater than the execution time of any subtask. Otherwise, the subtask will be repeatedly executed in each subsequent maintenance window. As a result, other subtasks cannot start and the overall data balancing task cannot be completed. Therefore, we recommend that you set the maintenance window to be greater than 5 hours. If you have questions about the maintenance window, contact us.

    • If a data balancing task is running after the parameter is set and the task is not within the new maintenance window, the data balancing task immediately stops and does not start until the maintenance window.

    • If the REBALANCE_MAINTENANCE_TIME_START value is earlier than the REBALANCE_MAINTENANCE_TIME_END value, the maintenance window is from REBALANCE_MAINTENANCE_TIME_START to REBALANCE_MAINTENANCE_TIME_END of the current day.

    • If the REBALANCE_MAINTENANCE_TIME_START value is later than theREBALANCE_MAINTENANCE_TIME_END value, the maintenance window is from REBALANCE_MAINTENANCE_TIME_START of the current day to REBALANCE_MAINTENANCE_TIME_END of the next day.

    • If the REBALANCE_MAINTENANCE_TIME_START value is equal to the REBALANCE_MAINTENANCE_TIME_END value, no maintenance window is set. After you add or remove a data node, the data balancing task automatically starts (regardless of whether it is within peak hours or not) and lasts until the data balancing task is completed.