This topic describes how to create a scheduled resizing policy for a tenant and describes the limitations of scheduled resizing tasks.
Background information
As business workloads change, tenant resource needs also change. Scheduled tenant resizing lets you dynamically adjust resource quotas for CPU and memory. This helps you adapt to different business scenarios and use cluster resources efficiently.
Enabling scheduled tenant resizing does not affect your business. However, to ensure business stability, perform this operation during off-peak hours.
Usage notes
Each tenant can have only one scheduled resizing task. This task resizes only the tenant's CPU and memory. The tenant's log disk scales automatically with the memory size.
NoteFor cluster instances of version 4.x or later, you can schedule adjustments for log disk capacity in addition to the tenant's CPU and memory resources.
If you manually modify tenant resources after you create a scheduled resizing policy, the scheduled task becomes invalid. You must modify the policy again to reactivate the task.
Tenant resizing tasks are independent of each other within the same cluster. If a resizing task for one tenant fails, it does not affect tasks for other tenants.
If a cluster has concurrent scheduled tenant resizing tasks, the tasks are executed based on the following priority:
Scale-in tasks have higher priority than scale-out tasks.
In a scale-in scenario, the scheduled task that releases more CPU has higher priority. In a scale-out scenario, the scheduled task that adds less CPU has higher priority.
Evaluate the cluster resource usage carefully. A resizing task may fail if resources are insufficient or if the cluster or tenant state does not support resizing. Resizing tasks do not support automatic retries.
NoteA scheduled resizing task runs only when both the cluster and the target tenant are in the Running state.
Prerequisites
You have created a tenant in the cluster instance. For more information, see Create a tenant.
The target tenant does not have a scheduled resizing policy.
Add a scheduled resizing policy
You can access the scheduled tenant resizing page in two ways:
Method 1: Log on to the OceanBase console. In the navigation pane on the left, click Instance List. On the Instance List page, click the name of the target instance to open the Cluster Instance Workbench. To the right of the Topology graph, click Resource Resizing and then Scheduled Tenant Resizing.
Method 2: Log on to the OceanBase console. In the navigation pane on the left, click Instance List. On the Instance List page, click the name of the target instance to go to the Cluster Instance Workbench. In the navigation pane on the left, click Tenant Management. On the Tenant Management page, click Scheduled Tenant Resizing in the upper-right corner.
The following procedure uses Method 1 as an example:
Log on to OceanBase Management Console .
In the left navigation pane, click Instance List.
On the Instance List page, click the name of the target cluster to open the Cluster Workbench.
To the right of the Topology graph, click Resource Resizing and select Scheduled Tenant Resizing.
On the Add Scheduled Resizing Policy page, set the policy parameters.
Parameter
Description
Tenant
From the drop-down list, select a tenant in the current cluster instance that does not have a scheduled resizing policy.
Target specifications
Set the CPU and memory specifications for the scheduled resizing policy within the allocatable range.
The minimum specification for a tenant is 1 CPU core and 4 GB of memory.
The ratio of CPU cores to memory (GB) cannot exceed 1:2.
Recurrence
Set the execution cycle for the scheduled resizing policy. Valid values:
One-time: The scheduled resizing policy performs the resizing operation only once at the set time.
Daily: Within the effective date range, the scheduled resizing policy performs the resizing operation once a day at the set time.
Weekly: Within the effective date range, the scheduled resizing policy performs the resizing operation once a week at the set time.
Monthly: Within the effective date range, the scheduled resizing policy performs the resizing operation once a month at the set time.
Effective date
Set the start and end times for the scheduled resizing policy.
This parameter is required when Recurrence is set to Daily, Weekly, or Monthly.
Resize start time
The start time of the resizing task.
Restore original specifications
Specifies whether to restore the original specifications after a one-time execution of the scheduled resizing task. Valid values:
Yes: Restore the original specifications.
No: Do not restore the original specifications.
This parameter is required when Recurrence is set to One-time.
Restoration time to original specifications
The time to restore the original specifications.
NoteThe lead time for a scheduled upgrade or downgrade task must be at least 1 hour. You can set the start time as required.
Click OK.
View scheduled resizing tasks
Log on to the OceanBase Management Console.
In the left navigation pane, click Instance List.
On the Instance List page, click the name of the target cluster to open the Cluster Workbench.
To the right of the Topology graph, click Resource Resizing and select Scheduled Tenant Resizing.
You can search for scheduled resizing tasks for a specific tenant by entering the tenant name or tenant ID.
To modify or delete a resizing task, click Edit or Delete in the corresponding row.