Updated on 2026-10-09 GMT+08:00

Configuring the Queue Capacity Policy of a Resource Pool

After a resource pool is added, the capacity policies of available resources need to be configured for Yarn task queues. This ensures that tasks in the resource pool are running properly. Each queue can be configured with the queue capacity policy of only one resource pool. Users can view the queues in any resource pool and configure queue capacity policies. After the queue policies are configured, Yarn task queues and resource pools are associated.

You can configure queue policies on MRS.

Prerequisites

  • The IAM users have been synchronized in advance. You can do this by clicking Synchronize next to IAM User Sync on the Dashboard page of the cluster details.
  • You have logged in to MRS Manager. For how to log in, see Accessing MRS Manager.
  • A resource pool has been added.
  • The task queue is not associated with other resource pools except the default default resource pool.

Notes and Constraints

In MRS 3.6.0 or later, the constraints for clusters with scheduled policies configured are as follows:

  • In a scheduled policy, the resource configuration of queues and their sibling queues supports only percentage-based allocation and does not support absolute values.
  • When a scheduled policy that is currently in effect is deleted, the system reverts to the default configuration within ten minutes.
  • Scheduled policies are periodically checked and applied. The parameter yarn.resourcemanager.time-policy.check-interval-secs defines the check period. To change the parameter value, log in to MRS Manager, choose Cluster > Services > Yarn, and click Configurations and then All Configurations. Search for the parameter, update its value, and restart the instance with expired configuration for the change to take effect.
  • You can add up to three scheduled policies, but only one policy is allowed for each frequency.
  • Only one scheduled policy can be valid at a time.
  • If the Capacity scheduler is used, the total resource capacity cannot exceed 100% after a scheduled policy takes effect.
  • If the Superior scheduler is used, neither the minimum nor the maximum resources in a scheduled policy can exceed 100% after the policy takes effect.

Configuring a Queue Capacity Policy on the MRS Management Console

  1. Log in to the MRS console.
  2. On the Active Clusters page, select a running target cluster and click its name to go to the cluster details page.
  3. On the cluster details page, click Tenants.
  4. Click the Resource Distribution Policies tab.
  5. In Resource Pools, select a specified resource pool.

    Available Resource Quota: indicates that all resources in each resource pool are available for queues by default.

  6. Locate the row that contains the target queue in the Resource Allocation area, and click Modify in the Operation column.
  7. In Modify Resource Allocation, configure the resource capacity policy of the task queue in the resource pool.

    • Capacity (%): specifies the percentage of the current tenant's computing resource usage.
    • Maximum Capacity (%): specifies the percentage of the current tenant's maximum computing resource usage.

  8. Click OK to save the settings.

Configuring the Queue Capacity Policy on Manager

For clusters of MRS 3.x and later

  1. Log in to FusionInsight Manager of the MRS cluster.

    For details about how to log in to FusionInsight Manager, see Accessing MRS Manager.

  2. Choose Tenant Resources > Dynamic Resource Plan and click the Resource Distribution Policy tab.
  3. Select the name of the target cluster from Cluster and select a resource pool from Resource Pool.
  4. Locate the row that contains the target queue in the Resource Allocation area, and click Modify in the Operation column.
  5. Modify the resource allocation.

    • Capacity scheduler
      1. In the Modify Resource Allocation window, click Resource Configuration Policy and set the resource capacity policy for the task queue in the resource pool.
        • Capacity (%): indicates the percentage of compute resources used by the current tenant.
        • Maximum Capacity (%): indicates the maximum percentage of compute resources used by the current tenant.
      2. In the Modify Resource Allocation window, click Scheduled Policy and configure a scheduled policy. (This operation is supported only in MRS 3.6.0 and later versions.)
        • Click Add Scheduled Policy to add a scheduled policy.
          Figure 1 Adding a scheduled policy
          • Policy Name: Provide a name for the scheduled policy. The name is used to differentiate active policies in logs.
          • Policy Frequency: Select Daily, Weekly, or Monthly.
          • Repeats On: Select one or more days of the week or month on which the policy will take effect. This parameter is available only when Policy Frequency is set to Weekly or Monthly.
          • Time Window: Select the time range during which the policy takes effect on the specified days. Multiple time ranges can be added. The time range must be at least 2 hours.

            For example, if this parameter is set to 08:00-16:00, the policy takes effect only during this time range.

          • Resource Capacity(%): Resource capacity applied when the policy takes effect.
          • Maximum Resource Capacity(%): Maximum resource capacity applied when the policy takes effect.
          • Enable Policy: Whether the policy is applied during the defined time window. A queue supports only one active policy at a time.
        • Click Modify in the Operation column to modify an existing scheduled policy.
        • Click Clear in the Operation column to delete an existing scheduled policy.
    • Superior Scheduler
      1. In the Modify Resource Allocation window, click Resource Configuration Policy and configure a resource configuration policy for the queue in the resource pool.
        Figure 2 Resource configuration policy
        • Weight: The task queue with a larger weight preempts resources first when resources are insufficient. Its initial value is the same as the minimum resource percentage.
        • Minimum Resource: indicates the minimum resources that a tenant can obtain.
        • Maximum Resource: indicates the maximum resources that a tenant can obtain.
        • Reserved Resource: indicates the resources that are reserved for the tenant's queues and cannot be lent to other tenants' queues.
      2. In the Modify Resource Allocation dialog box, click the User Policy tab and set the user policy.

        defaultUser(built-in) indicates that the policy specified by defaultUser is applied if no policy is explicitly specified by the user. The default policy cannot be deleted.

        • Click Add User Policy to add a user policy.
          • Username: indicates the name of a user.
          • Weight: The task queue with a larger weight preempts resources first when resources are insufficient. (available for versions earlier than MRS 3.5.0)
          • Priority: When task queues need to compete for resources, a queue with a higher priority obtains resources first. However, not all containers can be started. (available for MRS 3.5.0 and later)
          • Max vCores: indicates the maximum number of virtual cores that the user can obtain.
          • Max Memory(MB): indicates the maximum memory that the user can obtain.
        • Click Modify in the Operation column to modify an existing user policy.
        • Click Clear in the Operation column to delete an existing user policy.
      3. In the Modify Resource Allocation window, click Scheduled Policy and configure a scheduled policy. (This operation is supported only in MRS 3.6.0 and later versions.)
        • Click Add Scheduled Policy to add a scheduled policy.
          Figure 3 Adding a scheduled policy
          • Policy Name: Provide a name for the scheduled policy. The name is used to differentiate active policies in logs.
          • Policy Frequency: Select Daily, Weekly, or Monthly.
          • Repeats On: Select one or more days of the week or month on which the policy will take effect. This parameter is available only when Policy Frequency is set to Weekly or Monthly.
          • Time Window: Select the time range during which the policy takes effect on the specified days. Multiple time ranges can be added. The time range must be at least 2 hours.

            For example, if this parameter is set to 08:00-16:00, the policy takes effect only during this time range.

          • Weight: Set the weight of a queue when the policy takes effect.
          • Minimum Resource: Set the minimum resources allocated to a queue when the policy takes effect.
          • Maximum Resource: Set the maximum resources allocated to a queue when the policy takes effect.
          • Reserved Resource: Set the resources reserved for a queue when the policy takes effect.
          • Enable Policy: Specify whether the policy is applied during the defined time window. A queue supports only one active policy at a time.
        • Click Modify in the Operation column to modify an existing scheduled policy.
        • Click Clear in the Operation column to delete an existing scheduled policy.

  6. Click OK to save the settings.

For MRS clusters of 2.x and earlier:

  1. Log in to FusionInsight Manager of the MRS cluster.

    For details about how to log in to FusionInsight Manager, see Accessing MRS Manager.

  2. Click Tenant.
  3. Click the Dynamic Resource Plan tab.
  4. In Resource Pools, select a specified resource pool.

    Available Resource Quota: indicates that all resources in each resource pool are available for queues by default.

  5. Locate the row that contains the target queue in the Resource Allocation area, and click Modify in the Operation column.
  6. In Modify Resource Allocation, configure the resource capacity policy of the task queue in the resource pool.

    • Capacity (%): specifies the percentage of the current tenant's computing resource usage.
    • Maximum Capacity (%): specifies the percentage of the current tenant's maximum computing resource usage.

  7. Click OK to save the settings.