All Products
Search
Document Center

MaxCompute:Manage quotas for computing resources in the MaxCompute console

Last Updated:Sep 05, 2024

You can use the quota management feature to perform routine resource management and maintenance in the MaxCompute console. For example, you can view computing resource consumption, adjust computing resources, and perform create, read, update, and delete (CRUD) operations on quota configurations. This topic describes various capabilities that are provided by the quota management feature.

Background information

A quota is a unit of computing resources in MaxCompute. Quotas provide the computing resources (vCPUs and memory resources) that are required for computing jobs such as MaxCompute SQL jobs, MapReduce jobs, Spark jobs, Mars jobs, and Platform for AI (PAI) jobs. MaxCompute quotas are classified into level-1 quotas and level-2 quotas. Level-1 quotas are independent of each other. Level-2 quotas are subordinate to level-1 quotas. You can share resources among level-2 quotas. You cannot directly use resources in level-1 quotas because level-1 quotas are used only to manage level-2 quotas. You must use level-2 quotas to consume compute units (CUs) in level-1 quotas.

CUs are objects in a quota and are used as MaxCompute computing resources. CUs in quotas that you can purchase are classified into subscription CUs and pay-as-you-go CUs. Subscription CUs correspond to the subscription resource package and pay-as-you-go CUs correspond to the pay-as-you-go resource package.

  • A subscription quota is an exclusive quota that is created and allocated by the system after you purchase reserved CUs based on the monthly subscription period. When you use a subscription quota, you can pre-purchase elastically reserved CUs on a regular basis to meet your requirements. Elastically reserved CUs are pay-as-you-go resources and are charged based on the number of CUs that you purchased and the usage duration. If you run a job in a subscription quota, the job can use the maximum number of CUs specified in the quota. You can configure level-2 quotas for the level-1 quota to allocate CUs.

  • Pay-as-you-go quotas are common level-2 quotas that are allocated by the system when you activate the pay-as-you-go MaxCompute service. You cannot change the number of CUs or reallocate CUs in pay-as-you-go quotas.

You can choose to use pay-as-you-go quotas or subscription quotas based on your business requirements. Subscription quotas allow you to change the number of CUs to manage budgets. Pay-as-you-go quotas do not allow you to change the number of CUs.

View quotas

  1. Log on to the MaxCompute console. In the top navigation bar, select a region.

  2. In the left-side navigation pane, choose Workspace > Quotas.

  3. On the Quotas page, view the list of available quotas.

    The list displays the level-1 and level-2 subscription quotas and the default pay-as-you-go quota in the tree structure. By default, you can view the quota list by using an Alibaba Cloud account or as a RAM user.

    • Subscription quotas: Click the 列表 icon on the left of a level-1 quota to display its level-2 quotas and the effective configurations of the level-2 quotas. After you purchase subscription resources, the system automatically creates and allocates a level-1 quota and a level-2 quota named Default Subscription Quota.

    • Pay-as-you-go quotas: Click the 列表.png icon on the left of a level-1 quota to display its level-2 quotas. After you activate the Pay-as-you-go Standard Edition, the system automatically creates and allocates a level-1 quota named Default Pay-as-you-go Quota_p and a level-2 quota named Default Pay-as-you-go Quota.

      Note

      For some pay-as-you-go MaxCompute services, the default name of a level-2 quota is aliyun_nick. In regions outside the Chinese mainland, the default level-1 quota name of the pay-as-you-go service may not be properly displayed. This issue does not affect the use of level-2 quotas that belong to the level-1 quota.

Configure quotas

After you purchase subscription quotas, you can further configure subscription quotas. By default, an Alibaba Cloud account is authorized to configure level-2 subscription quotas. You can also configure level-2 subscription quotas as a RAM user after the RAM user is granted related permissions. For more information about permissions, see RAM permissions. You can perform the following configuration operations on subscription quotas:

  • Configure level-2 quotas: You can add or delete a level-2 quota.

  • Configure a quota plan: You can specify the number of elastically reserved CUs for a level-1 quota and configure the attributes and the number of CUs for each level-2 quota. After you purchase a subscription MaxCompute instance, each level-1 quota has a default quota plan named Default. Each quota plan contains the configurations of a level-1 quota and all its level-2 quotas. A quota plan is suitable for scenarios in which different quota configurations are used for different time periods in a day. For example, the number of CUs for a level-2 quota in the following time periods in a day is different: 00:00-08:00 and 08:00-24:00. You can configure two quota plans and schedule different configurations based on a time plan.

  • Configure a time plan: A time plan is used to schedule quota plans. After you purchase a subscription MaxCompute instance, the Default quota plan that is scheduled based on a time plan is not enabled by default. If you configure a time plan, the time plan for each level-1 quota automatically starts at 00:00. In the preceding example, you can configure a time plan to schedule different quota plans at 00:00 and 08:00.

    Note

    You can use time plans to schedule quota plans only by modifying the following parameters in the quota plans: minCU and maxCU of Reserved CUs [minCU,maxCU] and Elastically Reserved CUs.

  1. Log on to the MaxCompute console. In the top navigation bar, select a region.

  2. In the left-side navigation pane, choose Workspace > Quotas.

  3. On the Quotas page, find the level-1 quota that you want to configure and click Quota Configuration in the Actions column.

  4. Add or delete a level-2 quota.

    1. On the Quota Templates tab of the Quota Configuration page, click Add Quota.

      To delete a level-2 quota, you can find the quota on the Quota Templates tab, and click Delete in the Actions column.

      Note

      After you delete a level-2 quota, the quota is deleted from all the quota plans. The configurations of minCU and Elastically Reserved CUs in the deleted quota are added to the default level-2 quota. To modify the configurations, you must modify and update the associated quota plan.

    2. In the Add Quota dialog box, click + Add Quota. Then, specify a quota name, and select a quota type.

      Enter a custom quota name. Select a quota type based on your business requirements.

      • Batch: Quotas of this type are used to run batch jobs.

      • Interactive: Quotas of this type are used to run MaxCompute Query Acceleration (MCQA) jobs. You do not need to configure this type of quota as the default quota for computing resources. If the default quota for computing resources of your project is the subscription quota for batch jobs, MCQA jobs are automatically scheduled to a quota of the Interactive type. If multiple quotas of the Interactive type are available, MCQA jobs are automatically scheduled to the first quota of this type that you create. In this case, you can configure quota rules to schedule MCQA jobs initiated by different projects to different quotas of the Interactive type. For more information about quota rules, see the "Quota rules" section in Use of computing resources.

    3. Click OK.

  5. Configure a quota plan.

    After you create a quota, the quota is added to all the quota plans. The default value of minCU is 1 (deducted from the default level-2 subscription quota). You must change the number of CUs and attributes of the quota, and modify and update the quota plans.

    Note

    You can add a maximum of 48 quota plans. Each quota plan uses different configurations. This way, you can enable different quota plans for different time periods in a day.

    1. On the Quota Plans tab of the Quota Configuration page, click Add Plan.

    2. In the Create Quota Plan dialog box, configure the parameters. The following table describes the parameters.

      Parameter

      Description

      Exclusive or Not

      Specifies whether the quota is strongly exclusive. Even if CUs in an exclusive quota are idle, they are not used by other quota groups. This parameter is valid only for level-2 quotas. If the type of a level-2 quota is Interactive, the quota is automatically exclusive and cannot be changed.

      You can configure an exclusive quota for services such as business intelligence (BI) and ALGO because these services may always use CUs. If some CUs in a quota are idle, the idle CUs may be occupied by jobs that use another quota in which the value of maxCU is greater than the value of minCU. To prevent CUs in a quota from being occupied by jobs that use other quotas for a long period of time, you can configure an exclusive quota.

      Maximum Number of CUs for a Single Job

      The upper limit for CUs that can be concurrently used by a job scheduled to the quota. If this parameter is left empty, no upper limit is imposed. If this parameter is set to 0, concurrent use of CUs is not allowed. You can enter a positive integer as the upper limit. If the type of a level-2 quota is Interactive, this parameter is not available by default.

      You can configure this parameter to prevent jobs from waiting for resource allocation if a single job occupies a large number of CUs for a long period of time. You can also specify the upper limit at the job level by adding the set odps.task.max.concurrent.cu=<Number of CUs>; command before the code that you want to execute. The job-level configuration takes precedence over the quota-level configuration.

      Enable Priority

      Specifies whether to enable the priority feature. For more information, see Job priority. If the priority feature is enabled for a quota, the system preferentially runs the jobs that use the quota. You can also enable the priority feature at the project level. If the type of a level-2 quota is Interactive, this parameter is unavailable.

      Reserved CUs [minCU,maxCU]

      The number of reserved CUs in a subscription quota. The number of reserved CUs in a level-1 quota is equal to the number of CUs in the subscription quota that you purchased. In a subscription quota, the value of minCU is the same as the value of maxCU. To increase or decrease the number of reserved CUs, you must use the upgrade or downgrade method. This parameter cannot be modified. Descriptions of minCU and maxCU in a level-2 quota:

      • minCU specifies the lower limit, and maxCU specifies the upper limit. If the value of maxCU is greater than the value of minCU, CUs in level-2 quotas are shared among the jobs that use the level-2 quotas. If the number of CUs that are required is greater than the value of minCU in a level-2 quota and non-exclusive CUs in other quotas are idle, the non-exclusive CUs can be preempted.

      • The total value of minCU in all the level-2 quotas is equal to the value of minCU in the level-1 quota.

      • For a level-2 quota, the value of minCU must be less than or equal to the value of maxCU in the level-2 quota and less than or equal to the value of minCU in the level-1 quota that you purchased.

        Note

        You cannot set minCU to 0.

      • The values of minCU and maxCU of the default level-2 quota cannot be changed. The value of minCU of the default level-2 quota is equal to the value of minCU of the level-1 quota subtracted by the total value of minCU of all the custom level-2 quotas. The value of maxCU of the default level-2 quota is the same as the value of maxCU of the level-1 quota.

      Elastically Reserved CUs

      The number of elastically reserved CUs that you pre-purchase on a regular basis.

      • The number of elastically reserved CUs in a level-1 quota is equal to the number of CUs that you pre-purchase. The default value is 0. The maximum value of this parameter must be equal to the number of subscription-based reserved CUs and cannot exceed 10,000 CUs. You must check inventory data when you configure elastically reserved CUs. The minimum number of elastically reserved CUs is 50 and the step size is 50.

      • Descriptions of the number of elastically reserved CUs in a level-2 quota

        • The total number of elastically reserved CUs in all the level-2 quotas is equal to the number of elastically reserved CUs in the level-1 quota.

        • Elastically reserved CUs in the default level-2 quota cannot be changed. The number of elastically reserved CUs in the default level-2 quota is equal to the number of elastically reserved CUs in the level-1 quota subtracted by the total number of elastically reserved CUs in all the custom level-2 quotas.

      Non-reserved CUs

      The number of non-reserved CUs in a subscription quota.

      • The number of non-reserved CUs in a level-1 quota is equal to the number of non-reserved CUs in the subscription quota. To increase or decrease the number of non-reserved CUs, you must use the upgrade or downgrade method. You cannot increase the number of non-reserved CUs when resources are insufficient. This parameter cannot be modified.

      • Descriptions of the number of non-reserved CUs in a level-2 quota

        • The total number of non-reserved CUs in all the level-2 quotas is equal to the number of non-reserved CUs in the level-1 quota.

        • Non-reserved CUs in the default level-2 quota cannot be modified. The number of non-reserved CUs in the default level-2 quota is equal to the number of non-reserved CUs in the level-1 quota subtracted by the total number of non-reserved CUs in all the custom level-2 quotas.

    3. Click OK.

    4. On the Quota Plans tab, find the quota plan that you added, and click Apply Immediately in the Actions column.

      The following descriptions provide the operations related to quota plans:

      • View or modify a quota plan: On the Quota Plans tab, find the quota plan that you want to view or modify, and click Edit in the Actions column. You can modify and save the quota configurations in a quota plan. If the quota plan that you modify is in use, you must click Apply Immediately to make the latest configurations immediately take effect.

        Note

        You can click Apply Immediately to make any quota plan immediately take effect. However, if scheduling settings are configured for a time plan associated with the quota plan, the quota plan does not immediately take effect, and the subsequently scheduled quota plan is enabled instead. If you want to manually make a quota plan take effect, you must delete the associated time plan. This way, the quota plan for which you click Apply Immediately can take effect as expected.

      • Delete a quota plan: On the Quota Plans tab, find the quota plan that you want to delete, and click Delete in the Actions column.

        Note

        The default quota plan and the effective quota plan cannot be deleted.

  6. Configure a time plan.

    You can use the time plan feature to enable different quota plans for different time periods to implement the time-based logic for quota configurations.

    Note

    The time plan may have a latency of 3 minutes.

    1. On the Time Plans tab of the Quota Configuration page, click Edit Time Plan.

    2. In the Edit Time Plan dialog box, click + Add Quota and select the start time and the quota plan that you want to enable.

      • Time plans are considered as a whole. The default start time of a time plan is 00:00, which cannot be changed or deleted. The quota plan that corresponds to the time plan is the Default quota plan and can be modified. If no time periods are added, a quota plan is enabled for an entire day.

      • Different quota plans can be configured to enable at intervals of 30 minutes or 1 hour. Each quota plan can be repeatedly enabled.

    3. Click OK.

View quota consumption

You can view the consumption of CU resources in a level-1 quota.

Note

By default, you can perform this operation with your Alibaba Cloud account or as a RAM user.

  1. Log on to the MaxCompute console. In the top navigation bar, select a region.

  2. In the left-side navigation pane, choose Workspace > Quotas.

  3. On the Quotas page, find the destination level-1 quota, and click Configure Resources in the Actions column.

  4. On the page that appears, you can view the CPU resource consumption trend chart, quotas, and associated projects.

    • CPU resource consumption trend chart: allows you to select level-2 quotas and time ranges to view the trend of CU usage. Click a time point to view the job snapshot list that corresponds to the time point.

    • Quotas and associated projects: allow you to identify the projects that define a level-2 quota as the default quota.

Configure quota rules

You can configure quota rules in MaxCompute. After you configure a quota rule, jobs that meet the rule can be scheduled to consume the related quota. For more information about quota rules, see the "Quota rules" section in Use of computing resources.

Manage quota tags

You can add tags to or remove tags from level-1 subscription quotas. For more information about how to use a tag and the limits on using a tag, see Tag overview.

  1. Log on to the MaxCompute console. In the top navigation bar, select a region.

  2. In the left-side navigation pane, choose Workspace > Quotas.

  3. Add a tag.

    • Add a tag for a level-1 quota.

      1. Move the pointer over the 编辑 icon in the Tag column of the level-1 quota, and click Edit.

      2. In the Configure Tags dialog box, configure the Tag Key and Tag Value parameters.

      3. Click OK. In the Configure Tags successfully message, click Close.

    • Add tags for multiple level-1 quotas at a time.

      1. Select the level-1 quotas to which you want to add tags and click Batch Add Tag in the lower part of the page.

      2. In the Configure Tags dialog box, configure the Tag Key and Tag Value parameters.

      3. Click OK. In the Configure Tags successfully message, click Close.

  4. Filter quotas by tag.

    After you add tags for level-1 quotas, click Filter by Tag and select a tag key and a tag value to filter quotas.

  5. Optional. Remove tags from level-1 quotas.

    • Remove a tag from a level-1 quota.

      1. Move the pointer over the 编辑 icon in the Tag column of the level-1 quota, and click Edit.

      2. In the Configure Tags dialog box, click the 删除 icon next to the tag that you want to remove.

      3. Click OK. In the Configure Tags successfully message, click Close.

    • Remove tags from multiple level-1 quotas at a time.

      1. Select the level-1 quotas from which you want to remove tags and click Batch Remove Tag in the lower part of the page.

      2. In the Delete Tags for Multiple Resources dialog box, select the tags that you want to remove.

      3. Click Unbind x tags. x specifies the number of tags that you want to remove. In the Configure Tags successfully message, click Close.

Enable the time-specific configuration feature

Limits

  • You can configure a maximum of 48 time ranges for a reserved quota resource group. The minimum duration of each time range is 30 minutes.

  • After you configure the time-specific configuration for the current Tunnel service, if you need to downgrade the subscription Tunnel service, you must first decrease the number of slots that are allocated in different time ranges.

  • The time-specific configuration feature takes effect within 5 minutes, and the billing starts when the feature takes effect.

Procedure

You can configure time-specific billing for exclusive resource groups of Tunnel.

Note

By default, both the Alibaba Cloud account and the RAM users that belong to the Alibaba Cloud account can view the time-specific configuration.

  1. Log on to the MaxCompute console. In the top navigation bar, select a region.

  2. In the left-side navigation pane, choose Workspace > Quotas.

  3. On the Quotas page, find a quota whose Quota Type is Data Transmission Service, and click Time-specific Configuration in the Actions column.

  4. On the Time-specific Configuration page, configure the numbers of elastic slots that are allocated in different time periods. The elastic slots are charged based on the usage duration.

    1. Select a time period on the timeline and enter the number of slots that you want to allocate in the dialog box that appears. Make sure that the number of slots that you configure does not exceed the number of reserved slots.

    2. Click OK. The time-specific configuration is displayed in the lower part of the page. You can also click Cancel to cancel the current configuration or click Delete to delete the current configuration.