Hologres supports scaling plans for instances that use compute groups. With a scaling plan, Hologres automatically scales compute resources to handle traffic peaks. This improves instance stability, increases resource utilization, and reduces costs. This topic describes how to use the scheduled scaling feature.
Scenarios
For example, you use an instance that has three compute groups: init warehouse, warehouse 1, and warehouse 2. The data mid-end team uses the init warehouse to perform large-scale extract, transform, and load (ETL) operations, import large data volumes offline, perform near-real-time data import at the minute level, or import data in real time. Business team A uses warehouse 1 to query data. Business team B uses warehouse 2 to query data. In this example, you can use the scheduled scaling feature in the following scenarios:
Near-real-time data import at the minute level and real-time data import: These operations use the init warehouse compute group. If the data volume is stable throughout the day, you do not need to configure a scaling plan. If a write traffic peak occurs during a specific period every day, you can configure a scaling plan to provide elastic resources during the peak period.
Data queries by business teams: You can use different secondary compute groups to serve query requests from different business teams. This ensures load isolation. If the number of query requests is stable, you do not need to configure a scaling plan. If the number of query requests per day follows a clear cyclical pattern, you can configure a scaling plan to provide elastic resources during peak hours.
Large-scale ETL jobs and offline import of large data volumes: You can use Serverless resources. Serverless Computing can provide additional compute resources without the need to reserve them. This significantly improves instance stability, reduces out-of-memory (OOM) errors, and you are charged only for the tasks. For more information about Serverless Computing, see Serverless Computing. For more information about how to use Serverless Computing, see Serverless Computing guide.
Terms
For more information about the definitions of instance-level compute resources and compute group-level compute resources, see Glossary.
Example: The following figure shows the resources of an instance. The resource details are as follows:
Category | Resource details |
Instance | Reserved resources: 96 CU. 64 CU are allocated and 32 CU are unallocated. |
Elastic resources: 32 CU. | |
Total compute resources: 96 + 32 = 128 CU. | |
Compute group init_warehouse | Reserved resources: 32 CU. Elastic resources: 16 CU. Total compute resources: 48 CU. |

Billing
Instance reserved resources: These are dedicated compute resources for your instance that uses compute groups. You are charged for these resources based on the billing method of your instance, which can be subscription or pay-as-you-go.
Instance elastic resources: These include the additional compute resources that are provisioned by the scheduled scaling feature. The billing formula is:
Fee = Actual elastic resources used by the instance (CU × hour) × Unit price. For more information about the unit price, see Billing overview. Fees are settled on an hourly basis. The system sends you bills and automatically deducts the fees from your account.NoteThe system records the usage of instance elastic resources every minute. Every hour, the system calculates the usage, performs unit conversion, sends the bill for the hour, and automatically deducts the fees from your account.
Instance elastic resources are independent of unallocated instance resources. Even if the instance has unallocated reserved resources, the scheduled scaling feature provisions additional compute resources instead of using the unallocated resources.
Limits
The scheduled scaling feature is supported only for instances that use compute groups. It is not supported for general-purpose instances or read-only secondary instances.
The scheduled scaling feature is supported in Hologres V2.2.21 and later.
The support for scheduled scaling varies by region:
The scheduled scaling feature is in public preview. You can use your Alibaba Cloud account to fill out the form at Apply for the public preview of Hologres scheduled scaling to apply for a trial.
Region
Support for scheduled scaling
Description
China (Hangzhou), China (Shanghai), China (Beijing), and China (Shenzhen)
Supported
You can use this feature after your application is approved.
China (Shanghai) Finance Cloud, China (Beijing) Gov Cloud, China (Shenzhen) Finance Cloud, Japan (Tokyo), Malaysia (Kuala Lumpur), and Indonesia (Jakarta)
Not supported
You cannot apply for a trial.
China (Chengdu), China (Hong Kong), Singapore, Germany (Frankfurt), US (Silicon Valley), US (Virginia), and UAE (Dubai)
Submit a ticket to apply
If needed, apply for the feature by performing the following steps:
Fill out the form: Apply for the public preview of Hologres scheduled scaling.
Submit a ticket for further application.
Notes
Required permissions to use the scheduled scaling feature:
You must use an Alibaba Cloud account or a Resource Access Management (RAM) user to which the AliyunHologresWarehouseFullAccess policy is attached. This policy grants read-only permissions on the Hologres console and permissions to configure the scheduled scaling feature. For more information about how to grant permissions, see Grant permissions to a RAM user.
The account must have Superuser permissions on the instance. For more information about how to grant permissions, see Grant development permissions on an instance to a RAM user.
Scale-out and scale-in operations on compute groups affect queries and writes:
In Hologres V2.2, when you use the scheduled scaling feature to scale out or scale in a compute group, queries and writes on the compute group are interrupted for about 15 seconds.
In Hologres V3.0 and later, when a compute group is scaled out, queries and writes on the compute group are not affected. The status of the compute group is Processing. When a compute group is scaled in, queries and writes are still interrupted for about 15 seconds.
In Hologres V3.1 and later, when a compute group is scaled in, major queries and writes on the compute group are not affected. However, if a scale-in is triggered while a large query or large write is running in the compute group and the task needs to run for more than 60 minutes, the task reports an error 60 minutes after the scale-in operation begins.
After you configure a scaling plan for a compute group, note the following:
You cannot stop, delete, or scale in the compute group.
You can scale out the compute group only in the Hologres console. You cannot manually run the
hg_alter_warehousecommand to scale out the compute group.You can create a compute group only in the Hologres console. You cannot manually run the
hg_create_warehousecommand to create a compute group.
Procedure
Manage compute group resources
Go to the Compute Group Management page.
Log on to the Hologres console. In the top navigation bar, select a region.
In the navigation pane on the left, choose Instance List and then click the target Instance ID to open the instance details page.
In the navigation pane on the left of the instance details page, click Compute Group Management.
View the resource usage of the instance.
On the Compute Group Resource Management tab, you can view the resource usage of the instance, including instance reserved resources (allocated and unallocated) and instance elastic resources.
Manage compute group resources.
Click Create Compute Group. In the Create Compute Group dialog box, enter a Compute Group Name and specify Compute Group Resources to create a new compute group.
For a compute group with a Status of Running, you can perform the Modify Configurations, Restart, Stop, and Rebalance operations. For more information about rebalancing, see Rebalance shards (Rebalance).
NoteYou cannot Stop the default compute group of an instance, init_warehouse.
Compute group scaling plans
View the time series chart of the scaling plan
Go to the Compute Group Management page and click the Compute Group Scaling Plan tab.
From the Instance/Compute Group Selection drop-down list, select an instance or a compute group to view the time series chart of the scaling plan. The time series chart shows the future scaling plan for the instance or compute group. It does not show historical resource metrics.
Configure a scaling plan for a compute group
On the Compute Group Scaling Plan tab, click
to the left of the target compute group, and then click Add Time Period. Configure the start and end times of the daily effective period, specify the amount of elastic compute resources, and then click Save in the Actions column.You can Edit or Delete an existing scaling plan.
The amount of elastic compute resources cannot exceed the amount of reserved compute resources.
Each compute group supports up to five elastic time periods.
When you delete a scaling plan, the status of the compute group changes to Processing even if the compute group resources do not change. Reads and writes on the compute group are not affected.
When you save a scaling plan for a compute group, if the configuration for the current time changes the elastic resources, the change takes effect immediately. This means Hologres immediately performs a scaling operation on the compute group. The following examples provide details:
Example 1
Assume that the current time is 16:00. You add a scaling plan for compute group A, which has 64 CU of reserved resources.
The effective period is 15:00–18:00 and the elastic compute resources are 32 CU. After you save the plan, the total compute resources of compute group A are immediately scaled out to 96 CU.
Example 2
Assume that the current time is 16:00. You modify an existing scaling plan for compute group A, which has 64 CU of reserved resources.
Before modification: The effective period is 15:00–18:00 and the elastic compute resources are 32 CU.
After modification: The effective period is 17:00–18:00 and the elastic compute resources are 32 CU.
After you save the modification, the total compute resources of compute group A are immediately scaled in from 96 CU to 64 CU.
Monitoring and alerts for scheduled scaling
You can monitor the execution of scaling plans in the following ways:
Execution Log of Elastic Event
Go to the Compute Group Management page and click the Execution Log of Elastic Event tab.
Select a time range to view the historical execution details of scaling plans. The details include the execution time, compute group, execution status, event type, reserved compute resources, and target elastic compute resources.
Monitoring metrics
In the Hologres console, you can view the Warehouse_timed_elastic_cores(Count) metric, which indicates the number of elastic cores provisioned by the instance for scheduled scaling. You can also configure alert rules for this metric. For more information, see Monitoring metrics in the Hologres console.
CloudMonitor events
The scale-out and scale-in events that are executed by Hologres scaling plans are recorded in CloudMonitor.
Go to the CloudMonitor Event Center. On the System Events page, select Hologres from the product list in the Event Monitoring section. You can then monitor the scheduled scaling events. The events include the following:
Event name
Instance:Warehouse:TimedElastic:Start: The scheduled scaling of a compute group starts.Event name
Instance:Warehouse:TimedElastic:Finish: The scheduled scaling of a compute group is complete.Event name
Instance:Warehouse:TimedElastic:Failed: The scheduled scaling of a compute group fails.
You can configure notifications and alerts based on CloudMonitor events. For more information, see Use system events for alerting.
The following code shows the details of a scaling failure event as an example:
{ "Status": "Failed", "InstanceName": "<instance_id>", "ResourceId": "<instance_resource_id>", "Content": { "ScaleType": "ScaleDown", "ScheduleId": "xxxxxx", "TimedElasticCPU": 0, "WarehouseId": "2", "WarehouseName": "<warehouse_name>" }, "Product": "hologres", "Time": 1722852008000, "Level": "WARN", "RegionId": "<region>", "Id": "<event_id>", "GroupId": "0", "Name": "Instance:Warehouse:TimedElastic:Failed" }
ActionTrail
Operations performed in the Hologres console, such as editing scaling plans and the actual scale-out and scale-in operations, are recorded in ActionTrail. For more information, see Event audit logs.