Resource groups let you allocate a fixed share of compute resources—CPU and memory—to specific users in a Hologres instance. Each user is capped at their group's quota, so ETL jobs, analytics queries, and other workloads don't compete for the same resources.
Resource groups restrict CPU and memory for most query engine operations, but not all. SQL parsing, query optimization, metadata processing, scheduling, Parallel Query Engine (PQE) execution, and compaction fall outside the quota. For real-time writes, CPU is limited but memory is not. As a result, a resource group's actual CPU and memory usage may exceed its configured quota. Due to current technical limitations, not all types of computing workloads can be isolated using resource groups. Use this feature with caution in a production environment. For complete workload isolation, use elastic computing group instances instead.
Prerequisites
Before you begin, make sure that you have:
A Hologres instance running V1.1 or later. To upgrade an earlier instance, see Common upgrade preparation failure errors or contact support through the Hologres DingTalk group.
Superuser permissions on the instance.
Hologres V1.0 and earlier versions support resource isolation between instances but do not support user-level resource isolation within an instance. Resource groups require V1.1 or later.
Key concepts
Resource group — A named allocation of compute resources within a Hologres instance. Compute resources are measured in Compute Units (CUs), where each CU includes a share of CPU and memory.
`default` resource group — Every instance has a built-in default group. Before you create any custom groups, default holds 100% of the instance's resources. After you create additional groups, default automatically receives the remaining share. Always leave default with at least 0.3 (30%) of total resources.
Quota — The fraction of instance resources assigned to a group. Quota values range from 0.1 to 0.9 with one decimal place. The sum of all group quotas cannot exceed 1.
User attachment — A user belongs to exactly one resource group at a time. Unattached users fall into default. Attaching a user to a new group automatically removes them from the previous one. Detaching a user returns them to default.
Compute resources are allocated at the instance level. All databases in the same instance share the same resource allocation plan.
Manage resource groups
Use HoloWeb or SQL to create and manage resource groups.
View resource group configurations
Run the following query to see all resource groups, their quotas, and their attached users:
SELECT * FROM pg_holo_resource_groups;Example output:
res_group_name | property_key | property_value
----------------+--------------+------------------------------------------
resource_1 | worker_limit | 0.3
default | worker_limit | 0.7
resource_1 | bind_users | [ "13xxxxxxxxx13", "p4_29xxxxxxxxxx19" ]Create a resource group
HoloWeb
Open HoloWeb and go to Security Center in the top menu bar.
In the left navigation pane, click Resource Group Management.
Select the target instance and click Add Resource Group.

Enter a Resource Group Name, set the Resource Group Quota, and click OK.
The sum of quotas for all resource groups in an instance cannot exceed 1.
SQL
CALL hg_create_resource_group ('resource_group_name', quota);| Parameter | Description |
|---|---|
resource_group_name | Name of the resource group. Use letters, digits, and underscores only. Maximum 50 characters. |
quota | Fraction of instance resources to allocate. Value range: 0.1–0.9 (one decimal place). |
Adjust a resource group quota
HoloWeb
Go to Security Center > Resource Group Management.
Find the target resource group and click Adjust Quota in the Resource Group Quota column.

Enter the new quota value and click OK.
SQL
CALL hg_alter_resource_group ('resource_group_name', quota);| Parameter | Description |
|---|---|
resource_group_name | Name of an existing resource group. |
quota | New quota value. Value range: 0.1–0.9 (one decimal place). |
The sum of quotas for all resource groups in an instance cannot exceed 1.
Delete a resource group
HoloWeb
Go to Security Center > Resource Group Management.
Find the resource group and click Delete in the Actions column.
SQL
CALL hg_drop_resource_group ('resource_group_name');| Parameter | Description |
|---|---|
resource_group_name | Name of an existing resource group. |
A resource group cannot be deleted while users are attached to it. Detach all users first.
Attach a user to a resource group
HoloWeb
Go to Security Center > Resource Group Management.
Find the target resource group and click Associate User in the Actions column.
On the Attach Resource Group page, click Add User for Association.
In the Associate User dialog, select the user and click OK.
If the user does not appear in the list, the account has not been added to the instance. Add the user through the user management page first.
SQL
CALL hg_bind_resource_group('resource_group_name', 'user_name');| Parameter | Description |
|---|---|
resource_group_name | Name of an existing resource group. |
user_name | Name of an existing user with access to the instance. |
To check the current username, run:
SELECT current_user;Account name format by account type:
-- RAM user
CALL hg_bind_resource_group ('resource_1', 'p4_29xxxxxxxxxxx');
-- Alibaba Cloud account (must be enclosed in double quotation marks)
CALL hg_bind_resource_group ('resource_1', '"ALIYUN$xxxx@aliyun.com"');
-- RAM subaccount (must be enclosed in double quotation marks)
CALL hg_bind_resource_group ('resource_1', '"RAM$xxx@xxx:xxxx"');
-- Phone number account (must be enclosed in double quotation marks)
CALL hg_bind_resource_group ('resource_1', '"13xxxxxxxxxxx13"');A user can be attached to only one resource group. Attaching a user to a new group overwrites the previous attachment.
Detach a user from a resource group
HoloWeb
Go to Security Center > Resource Group Management.
Find the resource group and click Associate User in the Actions column.
Find the user and click Disassociate User in the Actions column.
In the Disassociate User dialog, click OK.
SQL
CALL hg_unbind_resource_group('resource_group_name', 'user_name');| Parameter | Description |
|---|---|
resource_group_name | Name of an existing resource group. |
user_name | Name of an existing user with access to the instance. |
After detachment, the user is automatically moved to the default resource group.
Examples:
CALL hg_unbind_resource_group ('resource_1', 'p4_29xxxxxxxxxxxxx9');
-- Alibaba Cloud account (must be enclosed in double quotation marks)
CALL hg_unbind_resource_group ('resource_1', '"RAM$xxxx@xxx:xxx"');FAQ
Why does a resource group's CPU or memory usage exceed its configured quota?
The quota restricts most query engine operations but not all. SQL parsing, query optimization, metadata processing, scheduling, PQE execution, and compaction run outside the quota boundary. For real-time writes, CPU usage is capped but memory usage is not. These unrestricted operations contribute to the total metrics, so a resource group's reported usage can exceed its configured quota.