All Products
Search
Document Center

AnalyticDB:Create and manage resource groups

Last Updated:Oct 27, 2025

This document describes how to create and manage resource groups in AnalyticDB for MySQL. It covers topics such as billing rules and how to create, modify, delete, and monitor resource groups.

Limits

A Data Warehouse Edition cluster must meet the following requirements:

  • The mode is Elastic mode.

  • The computing resources are 32 cores or more.

  • The kernel version is 3.1.3.2 or later.

    Note

    To view and update the minor version of an AnalyticDB for MySQL cluster, log on to the AnalyticDB for MySQL console and go to the Configuration Information section of the Cluster Information page.

Billing

Enterprise Edition, Basic Edition, or Data Lakehouse Edition

  • Elastic resources used by Interactive and Job resource groups are billed based on AnalyticDB Compute Unit (ACU) usage.

  • For AI resource groups of the Ray Cluster deployment type:

    • If Worker Resource Type is set to CPU, the elastic resources used by the AI resource group are billed based on ACU usage.

    • If Worker Resource Type is set to GPU, the AI resource group is billed based on the specifications and number of GPUs.

    • Worker Disk Space is billed based on the configured storage size.

You can view the elastic resource usage of a resource group as follows:

  • For Enterprise Edition and Basic Edition clusters: On the Resource Overview page, which is under Cluster Management > Resource Management, you can view the total and reserved resources used by all resource groups. The elastic resource usage is the difference between the total resources and the reserved resources.

  • For Data Lakehouse Edition clusters: On the Resource Overview page, which is under Cluster Management > Resource Management, you can view the total and reserved computing resources used by all resource groups. The elastic resource usage is the difference between the total computing resources and the reserved computing resources.

Data Warehouse Edition

The fees for resource groups are the same as for computing resources. You are charged only for the computing resources that you use.

Create a resource group

Enterprise Edition, Basic Edition, or Data Lakehouse Edition

By default, each cluster has an Interactive resource group named user_default. For new clusters with kernel version 3.2.2.8 or later, a Job resource group named serverless is also created by default. If no other resource groups are created, all XIHE queries are executed by the user_default resource group, and all Spark jobs, including Spark Jar and Spark SQL jobs, are executed by the serverless resource group. You can create a new resource group to isolate resources for queries.

  1. Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. Find the cluster that you want to manage and click the cluster ID.

  2. In the navigation pane on the left, choose Cluster Management > Resource Management, and then click the Resource Groups tab. In the upper-right corner of the resource group list, click Create Resource Group.

  3. Enter a name for the resource group and select a Job Type.

    • For online scenarios that require high queries per second (QPS) and low response time (RT), select Interactive.

      Interactive resource groups use resident computing resources to execute queries in Massively Parallel Processing (MPP) mode. This provides fast response times, typically at the millisecond level.

    • For offline scenarios that require high throughput, select Job.

      Job resource groups start temporary computing resources and execute queries in Bulk Synchronous Parallel (BSP) mode. This results in slower response times, typically at the second or minute level. The amount of temporary computing resources started is between 0 ACU and the maximum resources of the Job resource group. The specific amount depends on the size of the running task.

    • For heterogeneous computing scenarios, select AI.

      AI resource groups support heterogeneous computing resources such as GPUs and CPUs. They support multiple deployment types, including MLSQL models and Ray-hosted computing.

    Important

    The task type cannot be modified after the resource group is created.

  4. The properties to configure vary based on the selected task type. After you configure the properties, click OK.

    Interactive resource group properties

    Parameter

    Description

    Engine

    • XIHE Engine: The resource group supports only XIHE SQL.

    • Spark Engine: The resource group supports only Spark SQL jobs. Spark SQL jobs are processed in an interactive manner.

    Important

    The engine cannot be modified after the resource group is created.

    Automatic Stop

    When an Interactive resource group is idle for a specified period, the enabled clusters in the resource group are automatically released. An idle state means a few minutes have passed since the last command was executed.

    Enabling auto-stop reduces resource waste and saves costs. However, when you execute a query again, resources must be restarted, which causes a delay.

    Important

    This parameter is available only when Engine is set to Spark.

    Cluster Size

    • If Engine is set to XIHE: The size of a single cluster in ACUs. You can enter any value. The minimum value is 16 ACU.

    • If Engine is set to Spark: The size of a single cluster, which is the number of ACUs allocated to a Spark application. The minimum value is 24 ACU. Multiple Spark applications can run in each Spark Interactive resource group. The Minimum Clusters and Maximum Clusters parameters specify the number of Spark applications that can run in the resource group.

      For more information about the mapping between cluster size and the specifications of Spark Drivers and Spark Executors, see Appendix: Mapping between cluster size and Spark Driver and Spark Executor specifications.

    Minimum Clusters

    Maximum Clusters

    Minimum Clusters: The minimum number of clusters that must run in the resource group. The minimum value is 1.

    Maximum Clusters: The maximum number of clusters to which the resource group can be scaled out. The maximum value is 10.

    If Minimum Clusters and Maximum Clusters are different, AnalyticDB for MySQL dynamically scales the number of clusters between the minimum and maximum values based on the query payload of the resource group.

    If Minimum Clusters and Maximum Clusters are the same, AnalyticDB for MySQL starts the specified number of clusters after the resource group is created. This lets you statically control the total computing resources of the resource group.

    Note

    If Minimum Clusters or Maximum Clusters is set to 2 or greater, the Multi-Cluster feature is enabled for the resource group. For more information about the Multi-Cluster feature, see Multi-Cluster elastic model.

    Job Resubmission Rules

    Delivers queries that exceed the Query Execution Time Threshold to the Target Resource Group for execution. For more information, see Job delivery.

    Important

    This parameter is available only when Engine is set to XIHE.

    Spark Configuration

    Spark application configuration parameters. These parameters apply to all Spark jobs executed in this resource group. To configure parameters for a specific Spark job, you can set them in the code when you submit the job.

    For more information about Spark configuration parameters, see Spark application configuration parameters.

    Important

    This parameter is available only when Engine is set to Spark.

    Job resource group properties

    Parameter

    Description

    Minimum Computing Resources

    The minimum value is 0 ACU.

    Important

    Min Computing Resources cannot be modified after the resource group is created.

    Maximum Computing Resources

    The maximum value that can be set in the console is 1024 ACU, with a step size of 8 ACU. If you need more resources, submit a ticket to contact technical support.

    Spot Instance

    Specifies whether to enable spot instances.

    If you enable spot instances, Spark jobs that run on the Job resource group will attempt to use spot instance resources. For more information, see Spot instances.

    Spark Configuration

    Spark application configuration parameters. These parameters apply to all Spark jobs executed in this resource group. To configure parameters for a specific Spark job, you can set them in the code when you submit the job.

    For more information about Spark configuration parameters, see Spark application configuration parameters.

    AI resource group

    Parameter

    Description

    Deployment Mode

    Select RayCluster.

    Head Resource Specifications

    The Head node manages Ray metadata, runs the Global Control Store (GCS) service, and participates in task scheduling, but does not execute tasks.

    The Head resource specification is the number of CPU cores. You can select specifications such as small, m.xlarge, and m.2xlarge. The number of CPU cores for each specification is the same as for Spark resource specifications. For more information, see Spark resource specification list.

    Important

    The Head node is mainly responsible for job scheduling. Select a Head specification based on the overall size of the Ray Cluster.

    Worker Group Name

    A custom name for the Worker Group. You can configure multiple Worker Groups with different names in one AI resource group.

    Worker Resource Type

    Supports CPU and GPU.

    • If your business involves daily computing tasks, multitasking, or complex logical operations, select CPU.

    • If your business involves large-scale data parallel processing, machine learning, or deep learning training, select GPU.

    Worker Resource Specifications

    • If Worker Resource Type is set to CPU, you can select specifications such as small, m.xlarge, and m.2xlarge for the Worker resource specification. The number of CPU cores for each specification is the same as for Spark resource specifications. For more information, see Spark resource specification list.

    • If Worker Resource Type is set to GPU, due to issues related to GPU models and inventory, submit a ticket to contact technical support for assistance with model selection.

    Worker Disk Storage

    The disk space is mainly used to store Ray logs, temporary data, and overflow data from Ray distributed object storage. Unit: GB. Value range: [30, 2000]. Default value: 100 GB.

    Important

    The disk is for temporary storage only. Do not use it for long-term data storage.

    Minimum Workers

    Maximum Workers

    Minimum Workers: The minimum number of Workers that must run in a Worker Group. The minimum value is 1.

    Maximum Workers: The maximum number of Workers to which a Worker Group can be scaled out. The maximum value is 8.

    Worker Groups support automatic scaling, and each Worker Group can scale independently. If Min Workers and Max Workers are different, AnalyticDB for MySQL dynamically scales the number of Workers between the minimum and maximum values based on the number of tasks. If multiple Worker Groups exist, they are automatically matched to avoid overloading or idling a single Worker Group.

    Allocation Unit

    The number of GPUs to allocate on a single Worker node. For example, an allocation unit of 1/3 means that 1/3 of a GPU is configured for each Worker node.

    Important

    This parameter is required only when Worker Resource Type is set to GPU.

Data Warehouse Edition

  1. Log on to the AnalyticDB for MySQL console. In the upper-left corner of the console, select a region. In the left-side navigation pane, click Clusters. Find the cluster that you want to manage and click the cluster ID.

  2. In the navigation pane on the left, click Resource Group Management.

  3. On the Resource Group Management page, click Create Resource Group in the upper-right corner of the resource group list.

  4. Configure the resource group information.

    Parameter

    Description

    Resource Group Name

    A custom name for the resource group. The name must be 2 to 30 characters in length, start with a letter, and contain only letters, digits, and underscores (_).

    Query Type

    The type of SQL queries commonly used in this resource group. For more information, see Query execution modes.

    • Default_Type: The default query type.

    • Batch: Suitable for complex queries on large amounts of data, such as Extract-Transform-Load (ETL) queries. This type supports writing intermediate data results to disk. Query performance may decrease with large data volumes, but compute nodes will not fail due to excessive data.

    • Interactive: Suitable for real-time analysis queries that require low latency. This is a fast, memory-based interactive query type that offers good performance. However, queries will fail if the amount of data exceeds the processing capacity of the machine.

    Resource Amount

    Select the amount of resources to allocate to this resource group as needed.

  5. Click OK to create the resource group.

Modify a resource group

Enterprise Edition, Basic Edition, or Data Lakehouse Edition

Modifiable properties

  • For custom resource groups (resource groups that you create), you can modify the following properties:

    • For Interactive resource groups: Auto Stop, Cluster Size, Min Clusters, Max Clusters, Job Delivery Rule, and Spark Configuration.

    • For Job resource groups: Max Computing Resources, Spot Instance, and Spark Configuration.

    • For AI resource groups (Ray Cluster deployment type): Head Resource Specification, Worker Resource Type, Worker Resource Specification, Worker Disk Space, Min Workers, and Max Workers.

    Other properties cannot be modified, including Resource Group Name, Task Type, the Engine of Interactive resource groups, the Min Computing Resources of Job resource groups, and the Deployment Type and Worker Group Name of AI resource groups.

  • For default resource groups (resource groups named user_default and serverless):

    • For the user_default resource group in Enterprise Edition and Basic Edition clusters, you can modify only the Job Delivery Rule. You cannot modify any properties of the serverless resource group.

    • For the user_default resource group in Data Lakehouse Edition clusters, you can modify Reserved Computing Resources and Job Delivery Rule. You cannot modify any properties of the serverless resource group.

Procedure

  1. On the Resource Groups page, find the target resource group and click Modify in the Actions column.

  2. In the Modify Resource Group panel that appears, modify the property values. Then, click OK.

    The modification takes effect when the resource group status changes to Running.

Data Warehouse Edition

After a resource group is created, you can modify its query type or resource amount.

Modifiable properties

After a resource group is created, you can modify its query type or resource amount.

  • For the default resource group (named user_default), you can modify only the query type. You cannot manually modify the resource amount.

    Note

    The resource amount of the default resource group is calculated by subtracting the resources occupied by other resource groups in the cluster from the total cluster resources.

  • For custom resource groups (resource groups that you create), you can modify the query type and resource amount.

Procedure

  1. On the Resource Group Management page, find the target resource group and click Modify in the Actions column.

  2. Modify the Query Type or Resource Amount as needed.

  3. After you finish the modifications, click OK.

    Modifications to the resource amount of an AnalyticDB for MySQL resource group take effect in real time.

Delete a resource group

You cannot delete default resource groups, such as the user_default resource group and the serverless resource group.

Impacts of deleting a resource group

  • Deleting a resource group interrupts any tasks that are running in it.

  • If you delete a resource group that is specified in a XIHE SQL script or a Spark job, you must update the script or job to use a different resource group. Otherwise, the XIHE SQL job runs on the default resource group and the Spark job fails.

Procedure

On the Resource Groups page, click Delete in the Actions column for the target resource group. In the dialog box that appears, click OK.

Monitor resource usage (Enterprise Edition, Basic Edition, or Data Lakehouse Edition)

You can view resource usage at the cluster level, resources and loads at the resource group level, and resource consumption at the job level. For more information about each metric, see Resource group monitoring.

Query reserved and elastic resources for a cluster

  • For Enterprise Edition and Basic Edition: On the Cluster Management > Resource Management > Resource Overview page, you can view the Total Resources and Reserved Resources for all resource groups in the cluster at a specific point in time. The elastic resource usage is the difference between the Total Resources and Reserved Resources.

  • For Data Lakehouse Edition: On the Cluster Management > Resource Management > Resource Overview page, you can view the Total Computing Resources and Reserved Computing Resources for all resource groups in the cluster at a specific point in time. The elastic resource usage is the difference between the Total Computing Resources and Reserved Computing Resources.

Query resources and load for a single resource group

You can view the computing resources used by a single resource group. You can also monitor the load of the resource group based on metrics such as the number of running and queued XIHE SQL queries, the number of Spark engines, and the number of connections.

On the Cluster Management > Resource Management > Resource Groups page, find the target resource group and click Monitoring to view the computing resources used by the resource group.

Query resources consumed by a single job

The Job Usage Statistics tab displays resource consumption statistics for jobs such as XIHE BSP jobs, Spark jobs, and SLS/Kafka data synchronization and data migration tasks in the AnalyticDB for MySQL console.

On the Cluster Management > Resource Management > Job Usage Statistics page, you can view the total, reserved, elastic, and spot instance resources consumed by jobs.

FAQ

My cluster has 32 ACU of reserved resources. Are these resources shared between the default resource group and new custom resource groups?

If you have an Enterprise Edition or Basic Edition cluster, reserved resources can only be fully assigned to the user_default default resource group. The serverless default resource group, new Job resource groups, and new Interactive resource groups can only use elastic resources.

If you have a Data Lakehouse Edition cluster, you can assign reserved resources to the user_default default resource group, the serverless default resource group, new Job resource groups, or new Interactive resource groups. The amount of reserved resources assigned to the user_default group is determined by its minimum and maximum computing resource values. The remaining reserved resources are calculated by subtracting the resources assigned to the user_default group from the cluster's total reserved resources. These remaining resources can then be assigned to the serverless default resource group, new Job resource groups, or new Interactive resource groups.

Related APIs

You can use OpenAPI to create, modify, and delete resource groups, and to attach or detach database accounts.