All Products
Search
Document Center

Hologres:Single-instance resource group isolation (to be deprecated)

Last Updated:Feb 04, 2026

Hologres provides fine-grained resource management. You can assign different compute resources—known as Compute Units (CUs), which include CPU and memory—to different user accounts. This limits the maximum resources a user can consume and isolates multiple workloads within a single instance, ensuring that jobs from different users and applications do not interfere with each other. This topic describes how to use resource groups to manage compute resources and achieve resource isolation in a Hologres instance.

Background information

Hologres V1.0 and earlier versions support resource isolation between instances but do not support user-level resource isolation within an instance. In a production environment, you often need to isolate resources by user to limit the maximum resources each user can consume and ensure that jobs do not interfere with each other. To meet this requirement for fine-grained resource isolation, Hologres now supports resource groups to help you manage compute resources within an instance. 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 resource isolation, use elastic computing group instances.

Limits

  • Only Hologres V1.1 and later versions support the use of resource groups to manage compute resources in a Hologres instance. If your instance is earlier than V1.1, see Common upgrade preparation failure errors or join the Hologres DingTalk group for feedback. For more information, see How do I get more online support?.

  • Only users with Superuser permissions can use resource groups to manage compute resources in a Hologres instance. Otherwise, the system reports a permission error.

  • Compute resources are allocated at the instance level. If a user has multiple databases, all databases share the compute resources of the same instance and the same resource allocation plan.

Configure resource groups using the HoloWeb UI

You can configure resource groups using the HoloWeb UI as follows.

  • Create a resource group

    1. Go to the HoloWeb developer page. For more information, see Connect to HoloWeb and run a query.

    2. In the top menu bar of the HoloWeb developer page, click Security Center.

    3. On the Security Center page, click Resource Group Management in the navigation pane on the left.

    4. On the Resource Group Management page, select the target instance name and click Add Resource Group.新增资源组

    5. In the Add Resource Group dialog box, enter a Resource Group Name, set the Resource Group Quota, and then click OK to create the resource group.

      Note

      The sum of quotas for all resource groups in a Hologres instance cannot exceed 1. Otherwise, the system reports an error.

  • Delete a resource group

    1. Go to the HoloWeb developer page. For more information, see Connect to HoloWeb and run a query.

    2. In the top menu bar of the HoloWeb developer page, click Security Center.

    3. On the Security Center page, click Resource Group Management in the navigation pane on the left.

    4. On the Resource Group Management page, find the resource group that you want to delete and click Delete in the Actions column.

      Note

      A resource group cannot be deleted if users are attached to it.

  • Adjust a resource group quota

    1. Go to the HoloWeb developer page. For more information, see Connect to HoloWeb and run a query.

    2. In the top menu bar of the HoloWeb developer page, click Security Center.

    3. On the Security Center page, click Resource Group Management in the navigation pane on the left.

    4. On the Resource Group Management page, find the target resource group and click Adjust Quota in the Resource Group Quota column.

    5. In the Adjust Quota dialog box, change the resource group quota and click OK.调整配额

  • Attach a user

    After you create a resource group, you can use the HoloWeb UI to attach users to the resource group.

    1. Go to the HoloWeb developer page. For more information, see Connect to HoloWeb and run a query.

    2. In the top menu bar of the HoloWeb developer page, click Security Center.

    3. On the Security Center page, click Resource Group Management in the navigation pane on the left.

    4. On the Resource Group Management page, find the target resource group and click Associate User in the Actions column.

    5. On the Attach Resource Group page, click Add User for Association.

    6. In the Associate User dialog box, select a user and click OK.

      Note
      • If you cannot find the user account in the drop-down list, the account has not been added to the current instance. Go to the user management page to add the user.

      • A user can be attached to only one resource group. If you attach a user to a new resource group, the new attachment overwrites the previous one.

  • Detach a user

    1. Go to the HoloWeb developer page. For more information, see Connect to HoloWeb and run a query.

    2. In the top menu bar of the HoloWeb developer page, click Security Center.

    3. On the Security Center page, click Resource Group Management in the navigation pane on the left.

    4. On the Resource Group Management page, find the target resource group and click Associate User in the Actions column.

    5. On the Attach Resource Group page, find the user that you want to detach and click Disassociate User in the Actions column.

    6. In the Disassociate User dialog box, click OK.

Configure resource groups using SQL

  • View resource group configurations

    The following SQL statement queries all resource groups, their configured quotas, and the users attached to each group.

    SELECT  * FROM pg_holo_resource_groups;

    The following example shows the 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

    Note
    • By default, the system creates a resource group named `default`. All compute resources are allocated to this group, and all users who are not explicitly attached to another resource group are attached to this group.

    • After you create other resource groups, the resources of the `default` resource group are the remaining portion after allocation to all other groups.

    • Allocate at least 0.3 of the total resources to the `default` resource group.

    The following SQL statement creates a resource group.

    CALL hg_create_resource_group ('resource_group_name', quota);

    Parameter

    Description

    resource_group_name

    The name of the resource group. You can use English letters, digits, and underscores. The maximum length is 50 characters.

    quota

    The percentage of resources to allocate to the resource group. The value must be between 0.1 and 0.9, inclusive. Only one decimal place is supported.

  • Modify a resource group quota

    Note

    The sum of quotas for all resource groups in a Hologres instance cannot exceed 1. Otherwise, the system reports an error.

    The following SQL statement modifies a resource group quota.

    CALL hg_alter_resource_group ('resource_group_name', quota);

    Parameter

    Description

    resource_group_name

    The name of the resource group. The resource group must already exist. Otherwise, the system reports an error.

    quota

    The percentage of resources to allocate to the resource group. The value must be between 0.1 and 0.9, inclusive. Only one decimal place is supported.

  • Delete a resource group

    Note

    A resource group cannot be deleted if users are attached to it.

    The following SQL statement deletes a resource group.

    CALL hg_drop_resource_group ('resource_group_name');

    Parameter

    Description

    resource_group_name

    The name of the resource group. The resource group must already exist. Otherwise, the system reports an error.

  • Attach a user to a resource group

    Note
    • A user can be attached to only one resource group. If you attach a user to a new resource group, the new attachment overwrites the previous one.

    • You can run the following SQL statement to view the current user.

      SELECT current_user;

    After you create a resource group, you can attach a user to it to limit the compute resources that the user can consume. The following SQL statement attaches a user to a resource group.

    • Example syntax

      CALL hg_bind_resource_group('resource_group_name', 'user_name');
    • Parameters

      Parameter

      Description

      resource_group_name

      The name of the resource group. The resource group must already exist. Otherwise, the system reports an error.

      user_name

      The name of the user. The user must exist and have permissions to access the instance to which the resource group belongs. Otherwise, the system reports an error.

    • Examples

      CALL hg_bind_resource_group ('resource_1', 'p4_29xxxxxxxxxxx');
      -- Note: Alibaba Cloud accounts must be enclosed in double quotation marks.
      CALL hg_bind_resource_group ('resource_1', '"ALIYUN$xxxx@aliyun.com"');
      CALL hg_bind_resource_group ('resource_1', '"RAM$xxx@xxx:xxxx"');
      CALL hg_bind_resource_group ('resource_1', '"13xxxxxxxxxxx13"');
  • Detach a user from a resource group

    Note

    After a user is detached from a resource group, the user is moved to the `default` resource group.

    The following SQL statement detaches a user from a resource group.

    • Syntax

      CALL hg_unbind_resource_group('resource_group_name', 'user_name');
    • Parameters

      Parameter

      Description

      resource_group_name

      The name of the resource group. The resource group must already exist. Otherwise, the system reports an error.

      user_name

      The name of the user. The user must exist and have permissions to access the instance to which the resource group belongs. Otherwise, the system reports an error.

    • Examples

      CALL hg_unbind_resource_group ('resource_1', 'p4_29xxxxxxxxxxxxx9');
      -- Note: Alibaba Cloud accounts must be enclosed in double quotation marks.
      CALL hg_unbind_resource_group ('resource_1', '"RAM$xxxx@xxx:xxx"');

FAQ

Q: Why do the CPU and memory metrics exceed 50% when the resource group quota is set to 0.5?

A: The resource group quota limits the CPU and memory for most query engine operations. However, a small portion of CPU and memory usage is not restricted by the resource group. This includes, but is not limited to, SQL parsing, optimization, metadata processing, scheduling, Parallel Query Engine (PQE) execution, and compaction. In addition, for real-time writes, CPU usage is limited, but memory usage is not. Therefore, the total CPU and memory metrics for a resource group may exceed its configured quota.