Quota management is a module in the MaxCompute console that you can use to view, adjust, and manage compute resources for daily operations and maintenance (O&M). This topic describes the features of Quota management.
Introduction to quotas
A MaxCompute quota is a unit of compute resources. It provides compute resources such as CPU and memory for jobs such as MaxCompute SQL, MapReduce, Spark, Mars, and PAI.
MaxCompute quotas are divided into level-1 and level-2 quotas. Level-1 quotas are independent of each other. Level-2 quotas belong to a level-1 quota, and their resources can be shared. A level-1 quota manages its level-2 quotas and cannot be used directly. You must use a level-2 quota to consume compute unit (CU) resources.
CUs are the fundamental units of computing resources within a quota. MaxCompute supports both subscription and pay-as-you-go billing methods.
Compute fees (subscription): You can purchase reserved CUs on a monthly basis. The system then creates and allocates a dedicated quota for you. If needed, you can purchase elastic reserved CUs on an hourly basis in addition to your monthly CUs. Elastic reserved CUs are a pay-as-you-go service billed based on the number of CUs and the duration of use. When a job runs in a subscription quota, it can use up to the number of CUs purchased for that quota. You can customize the allocation of CUs to level-2 quotas within a level-1 quota to control your budget.
Compute costs (pay-as-you-go): In this pay-as-you-go billing method, the system allocates a public, level-2 quota. You cannot control the number of CUs or make further allocations.
View a quota
Log on to the MaxCompute console and select a region in the top-left corner.
In the navigation pane on the left, choose .
On the Quotas page, view the list of available quotas.
Hover over the target level-1 or level-2 quota and click the
icon to Follow the quota.On the Overview page, in the My Following section, you can view your followed Quotas.
The list displays level-1 and level-2 quotas in a tree structure. By default, Alibaba Cloud accounts and their RAM users can view this list.
Subscription quota: Click the
icon to the left of a level-1 quota to expand the list of level-2 quotas. The current configuration of the level-2 quotas is also displayed. After you purchase subscription resources, the system creates and allocates a level-1 quota and a level-2 quota by default.Pay-as-you-go quota: Click the
icon to the left of a level-1 quota to expand the list of level-2 quotas. After you enable pay-as-you-go Standard Edition, the system creates the default level-1 quota Default pay-as-you-go Quota_pand the level-2 quotaDefault pay-as-you-go Quota.NoteThe default level-2 quota for some pay-as-you-go quotas is named
aliyun_nick. In regions outside China, the name of the default level-1 quota for pay-as-you-go may not be displayed correctly. This does not affect the usage of the level-2 quota.You can create only one pay-as-you-go quota in each region. Cross-region use is not supported.
Configure a quota
You can configure a purchased subscription Standard compute resource quota. By default, an Alibaba Cloud account has the permission to configure quotas. A RAM user can also be granted this permission. For more information, see RAM permissions. Quota configuration consists of basic configuration and scaling configuration.
Basic configuration
A level-1 quota supports a maximum of 100 level-2 quotas. You should plan and configure your quotas based on your business scenarios.
This involves adding or deleting level-2 quotas for cloud data warehouse resource types and configuring basic parameters. These parameters include exclusive use, CU limit per job, priority, non-reserved CUs, and the scheduling policy. It also includes configuring reserved CUs and elastic reserved CUs. This configuration applies only to the current configuration plan. If you do not have time-based scaling scenarios, this configuration is sufficient for quota management.
Scaling configuration
Quota scaling configuration, also known as time-based scaling, lets you set different minimum and maximum reserved CUs or elastic reserved CUs for a quota at different times.
Configuration procedure
Log on to the MaxCompute console and select a region in the top-left corner.
In the navigation pane on the left, choose .
On the Quotas page, find the target quota and click Quota Configuration in the Actions column.
You can configure only quotas for which the Billing Method is Subscription.
Perform basic quota configuration.
On the Quota Configuration page, click the Basic Configurations tab, and then click Edit Basic Configurations.
The following table describes the parameters.
Parameter
Description
Quota Name
A custom name. The name must start with a letter and can contain letters, digits, and underscores (_).
Type
Batch: A quota used to run batch jobs.
Interactive: A quota dedicated to running query acceleration (MCQA) jobs. You do not need to configure it as the default compute quota for a project.
If the default compute quota for a project is a subscription batch processing quota, jobs that hit query acceleration are automatically scheduled to an interactive quota for execution.
If there are multiple interactive quotas, MCQA jobs are scheduled to the earliest created interactive quota by default. Therefore, you need to use quota rules to schedule MCQA jobs initiated by different projects to different interactive quotas. For more information about quota rules, see Quota rules.
Reserved CUs [minCU,maxCU]
The monthly reserved CUs. minCU is the guaranteed value, and maxCU is the upper limit.
The reserved CUs of a level-1 quota is the number of CUs purchased on a subscription basis (minCU=maxCU). To scale out or scale in, you must upgrade or downgrade the quota. This parameter cannot be edited here.
If maxCU > minCU, the level-2 quotas are in shared mode. If the requested CUs exceed the min value, idle and non-exclusive CUs from other quotas will be preempted.
The sum of the minCU values of all level-2 quotas equals the minCU value of the level-1 quota.
The minCU of a level-2 quota must be less than or equal to its maxCU, which must be less than or equal to the minCU purchased for the level-1 quota.
The minCU and maxCU of the default level-2 quota cannot be edited:
minCU of the default level-2 quota = [minCU of the level-1 quota] - [Sum of the minCU values of custom level-2 quotas];The maxCU value is the same as the maxCU value of the level-1 quota.
The minCU of a level-2 quota cannot be set to 0 for now.
For a new quota
This configuration applies only to the currently active configuration plan.
If multiple scaling configuration plans exist, the new quota is added to all of them after it is created. In plans other than the currently active one, the default reserved minCU is 1 (deducted from the default subscription level-2 quota). Therefore, to adjust the number of CUs, edit the configuration plans on the Scaling Configuration tab.
Elastically Reserved CUs
The number of elastic CUs reserved on an hourly basis. For more information about the billing of elastic reserved CUs, see Compute costs (hourly billing).
The elastic reserved CUs for a level-1 quota is the number of CUs you need to reserve. The default value is 0. The maximum value is the number of subscription reserved CUs purchased for the quota, and cannot exceed 10,000 CUs. This is also subject to inventory, which means an inventory check is performed during scale-out configuration. The scale-out capacity must be at least 50 CUs or a multiple of 50.
The elastic reserved CUs for a level-2 quota are defined as follows:
The sum of the elastic reserved CUs of all level-2 quotas equals the elastic reserved CUs of the level-1 quota.
The elastic reserved CUs of the default level-2 quota cannot be edited. It is calculated by subtracting the sum of the elastic reserved CUs of custom level-2 quotas from the elastic reserved CUs of the level-1 quota.
For a new quota
This configuration applies only to the currently active configuration plan.
If multiple scaling configuration plans exist, the new quota is added to all of them after it is created. In plans other than the currently active one, the default elastic reserved CUs is 0. Therefore, to adjust the number of CUs, edit the configuration plans on the Scaling Configuration tab.
Exclusive or Not
Specifies whether to make the quota strongly exclusive. If a quota is exclusive, its CUs cannot be occupied by other quota groups even if they are idle.
This parameter can be configured only for level-2 quotas. If the level-2 quota type is Interactive, this parameter is set to exclusive by default and cannot be modified.
This applies to quota groups that run services such as BI or ALGO. Jobs of this type may be used at any time. You must prevent them from being occupied by other quotas for a long time without being released. When the max value of a quota is greater than its min value, it may occupy other idle quotas.
Maximum Number of CUs for a Single Job
Sets the upper limit on concurrent CUs for jobs that run in this quota. An empty value indicates no limit. A value of
0indicates an absolute limit. You can enter a positive integer to set a reasonable limit.If the level-2 quota type is Interactive, this parameter is unavailable by default.
This prevents a single job from occupying many CUs for a long time, which would cause other jobs to wait for resources. You can also set a limit at the job level by running the
set odps.task.max.concurrent.cu=<CU_amount>;command before the code to be executed. The job-level configuration has a higher priority than the quota-level configuration.
Enable Priority
The priority feature. For more information, see Job priority.
Jobs that run on this quota are executed with priority. This also takes effect if priority is enabled at the project level. If the level-2 quota type is Interactive, this parameter is unavailable by default.
Non-reserved CUs
The number of monthly non-reserved CUs.
The non-reserved CUs of a level-1 quota is the number of non-reserved CUs purchased on a subscription basis. To scale out or scale in, you must upgrade or downgrade the quota. Scale-out is not possible due to current inventory shortages. This parameter cannot be edited here.
The non-reserved CUs of a level-2 quota are defined as follows:
The sum of the non-reserved CUs of all level-2 quotas equals the non-reserved CUs of the level-1 quota.
The non-reserved CUs of the default level-2 quota cannot be edited. It is calculated by subtracting the sum of the non-reserved CUs of custom level-2 quotas from the non-reserved CUs of the level-1 quota.
Scheduling Policy
MaxCompute level-2 quota scheduling policies include FAIR and FIFO.
FAIR (Fair scheduling)
If jobs have the same priority, resources are evenly allocated to all jobs submitted at the same time.
If jobs have different priorities, resources are first evenly allocated to higher-priority jobs. If resources remain, they are then evenly allocated to lower-priority jobs.
FIFO (First in, first out)
If jobs have the same priority, resources are allocated to the job that was submitted first.
If jobs have different priorities, resources are allocated to the higher-priority job, even if it was submitted later than a lower-priority job.
Select an appropriate scheduling policy as needed. You cannot set a scheduling policy for interactive level-2 quotas. For more information, see Compute resources - Quota scheduling policies.
ImportantStarting from May 24, 2023, the default scheduling policy for new level-2 quotas in the China (Hangzhou), China (Shanghai), China (Beijing), China (Zhangjiakou), China (Ulanqab), China (Shenzhen), and China (Chengdu) regions is FIFO. For level-2 quotas created in these regions before this date, the default scheduling policy is FAIR.
Delete a quota.
On the Quota Configuration page, click the Basic Configurations tab, and then find the target quota and click Delete in the Actions column.
After a level-2 quota is deleted, it is removed from all resource configuration plans. Its allocated minimum CUs and elastic reserved CUs are returned to the default level-2 quota. To make adjustments, you can edit and update each configuration plan on the Scaling Configuration tab.
Configure quota scaling.
After you purchase a subscription MaxCompute project, each level-1 quota has a default resource configuration plan named
Default.Each resource configuration plan includes the reserved CU and elastic reserved CU configurations for a level-1 quota and all its level-2 quotas. You can use multiple configuration plans with time-based management for scenarios where different configurations are needed at different times of the day. For example, if the CU requirements for a level-2 quota differ between the 00:00–08:00 and 08:00–24:00 time periods, you can create two quota configuration plans and use time-based management to schedule them.
NoteYou can add up to 48 resource configuration plans. Each plan can have a different configuration to be enabled at different times of the day.
On the Quota Configuration page, click the Scaling Configuration tab.
On the Scaling Configuration tab, click Add Configuration Plan. In the Add Configuration Plan dialog box, enter a Configuration Plan Name and configure Reserved CUs [minCU,maxCU] and Elastically Reserved CUs for the level-2 quota.
Click OK to add the plan.
On the Scaling Configuration tab, find the target configuration plan and click Apply Immediately in the Actions column to apply it immediately. You can also use an existing plan when you configure Scheduled Scaling Management.
You can click Apply Immediately for any configuration plan. If a time-based management schedule is set, the plan is overwritten by the next scheduled plan. Therefore, if you want to manually activate a specific plan and keep it active, you must clear all other time-based settings. This ensures that your action takes effect immediately and is not overwritten.
(Optional) Perform other operations on resource configuration plans as follows:
View a configuration plan
On the Scaling Configuration tab, click the
icon to the left of Configuration Plan Name to expand the plan details and view the information for each plan.Edit a configuration plan
On the Scaling Configuration tab, find the target configuration plan and click Edit in the Actions column to update it.
If you edit the currently active plan, you must also click Apply Immediately in the Actions column to apply the changes.
Delete a configuration plan
On the Scaling Configuration tab, find the target configuration plan and click Delete in the Actions column to delete it.
The Default plan and the currently active plan cannot be deleted.
Clone a configuration plan
On the Scaling Configuration tab, find the target configuration plan and click Clone in the Actions column to create a copy of the plan.
Configure time-based management.
You can set different quota configuration plans to take effect at different times of the day. This allows for time-based management of quota configurations.
NoteTime-based scheduling may have a delay of up to 5 minutes.
On the Scaling Configuration tab, click Edit Time Plan in the Scheduled Scaling Management area.
Click Add Effective Period and select an Effective Start Time and a Configuration Plan.
NoteEach quota has a single time plan. The default runtime is 00:00, which cannot be modified or deleted. This runtime corresponds to the Default configuration plan, which can be modified. If you do not add more runtimes, the same configuration plan remains active throughout the day.
You can enable different configuration plans on the hour or half-hour. A configuration plan can be reused.
View quota consumption
You can view the consumption of CU resources within a level-1 quota. By default, Alibaba Cloud accounts and their RAM users can view this information.
Log on to the MaxCompute console and select a region in the top-left corner.
In the navigation pane on the left, choose .
On the Quotas page, find the target quota and click Configure Resources in the Actions column.
On the Configure Resources page, click the
icon to the left of a Level-2 Quota to expand it and view the consumption trend chart, the quota, and the list of associated projects for CPU Resources (Unit: Core) and Memory Resource (Unit: GB).For CPU Resources (Unit: Core) and Memory Resource (Unit: GB), you can select different level-2 quotas and time ranges to view usage trends for different types of CUs. Click a time point to view the job snapshot list for that time.
List of quotas and associated projects: You can view which projects have set the corresponding level-2 quota as their default compute quota.
Quota rules
MaxCompute lets you configure conditional rules for quotas. These rules specify that jobs meeting certain conditions are scheduled to run in the corresponding quota. For more information, see Quota rules.
Quota tag management
MaxCompute lets you attach tags to and detach tags from level-1 subscription quotas. For more information about how to use tags and their limits, see What are tags?.
Log on to the MaxCompute console and select a region in the top-left corner.
In the navigation pane on the left, choose .
Create a tag.
On the Quotas page, view the list of available quotas.
Create a tag for a single level-1 quota.
Hover over the
icon in the Tag column of the target top-level quota (for the Subscription billing method only), and click Edit or Edit.If no tags have been created, Edit is displayed. Otherwise, Edit is displayed.
In the Configure Tags dialog box, enter a Tag Key and a Tag Value.
Click OK. In the Configure Tags successfully dialog box, click Close.
Create tags for multiple level-1 quotas in a batch.
Select the level-1 quotas to which you want to add tags in batches and click Batch Add Tag at the bottom of the page.
In the Configure Tags dialog box, enter a Tag Key and a Tag Value.
Click OK. In the Configure Tags successfully dialog box, click Close.
Filter by tag.
On the Quotas page, click Filter by Tag to filter quotas by tag key and value.
(Optional) Detach a tag.
Detach a tag from a single level-1 quota.
Hover over the
icon in the Tag column of the target level-1 quota, and click Edit.In the Configure Tags dialog box, click the
icon next to the tag that you want to detach.Click OK. In the Configure Tags successfully dialog box, click Close.
Detach tags from multiple level-1 quotas in a batch.
Select the level-1 quotas from which you want to detach tags in batches and click Batch Remove Tag at the bottom of the page.
In the Delete Tags for Multiple Resources dialog box, select the tags that you want to detach.
Click Detach x Tags (where x is the number of tags to detach). In the Configure Tags successfully dialog box, click Close.