Automatic scaling (Public preview)

更新时间:
复制 MD 格式

Business workloads often fluctuate. A fixed resource allocation can cause poor performance during peak hours and leave resources idle during off-peak hours. To solve this, OLAP resource groups offer automatic scaling. This feature dynamically adds or removes compute nodes based on the real-time load. It scales out when query pressure increases, providing sufficient computing power. It scales in when the load drops, reclaiming idle resources. This on-demand model ensures performance during peak times while maximizing resource utilization and cost-effectiveness.

Enable automatic scaling

The following system-level parameters control the behavior of automatic scaling. Use them to enable the feature and define the number of nodes for scaling.

Configuration parameter

Description

enable_cost_based_auto_scaling

A flag that enables automatic scaling. Set to true to enable or false to disable. The default value is false.

cost_based_auto_scaling_min_nodes

The minimum number of nodes to maintain basic computing power. The value must be 2 or greater. The default value is -1, which means automatic scaling is disabled by default.

cost_based_auto_scaling_max_nodes

The maximum number of nodes to handle peak loads. This value must be greater than the minimum number of nodes. The default value is -1, which means automatic scaling is disabled by default.

Important
  • You can enable the automatic scaling feature using backend parameters. You must first specify the minimum and maximum number of nodes. To enable or adjust these configurations, contact Lindorm technical support (DingTalk ID: s0s3eg3).

  • After you enable automatic scaling, the resource group is billed based on the actual amount of compute resources used. The cost changes in real time because the system scales out or scales in to handle load changes. For the actual cost, refer to the console.

Force a scale-out

Resource groups can automatically identify large queries. However, in some scenarios, you may want a specific query to use the maximum amount of resources to meet its performance requirements. In these scenarios, you can add a specific hint to a large query to force a scale-out operation. This gives you more control over computing resource management.

When you run a query, you can set the session parameter big_query_flag to true to force the SQL engine to treat the query as a large query. If the current resource group has not reached its node limit, the system immediately triggers a scale-out operation until it reaches the configured maximum number of nodes. This provides peak computing power for this critical query and ensures its execution performance.

The following example shows how to do this:

SELECT /*+ SET_VAR("big_query_flag"="true") */ * 
  FROM somedb.sometable;