MaxCompute offers a lower-cost pay-as-you-go compute resource type called the Spot Edition. This helps you reduce costs when you use MaxCompute in latency-insensitive scenarios. This topic describes the common scenarios, resource details, and billing rules for the MaxCompute pay-as-you-go Spot Edition. It also explains key considerations and how to use this feature.
Scenarios
The Pay-as-you-go Idle Edition is suitable for jobs that require very low costs but are not sensitive to completion time. For example, this edition is ideal for analyzing low-value, massive data, such as behavioral logs and system logs. These workloads typically consume a large amount of compute resources but are not sensitive to completion time. In this scenario, using subscription resources can result in idle dedicated resources, while using the Pay-as-you-go is too costly. The less sensitive a job is to its completion time, the more computing costs you can save using the Pay-as-you-go Idle Edition. However, the Pay-as-you-go Idle Edition is not recommended for production jobs that require long-term stability and guaranteed resources. This is because resource competition can cause job resources to be constrained or preempted, which may result in long wait times, increased runtimes, or even forced termination. This can in turn affect your business operations.
Resource Details
When you enable the pay-as-you-go Spot Edition, you gain access to MaxCompute idle-time compute resources (os_SpotQuota). These are shared, pay-as-you-go compute resources. Jobs that run on these resources are called Spot jobs. Compared with jobs that use the pay-as-you-go , Spot jobs have a lower unit price. This helps you reduce costs for development, testing, and other latency-insensitive scenarios.
Base Resource | Resource Details | Billing Details |
Compute resource | The idle-time compute resource pool shares infrastructure with the pay-as-you-go but is isolated from subscription resources. You cannot specify a fixed quota. If overall resource usage in the pool is high and competition occurs, Spot jobs (jobs running under os_SpotQuota—including SpotSQL, SpotMapReduce, and SpotSpark) may have their resources squeezed or preempted, or the jobs may be terminated. | You are billed based on actual usage of each compute job type. For detailed billing rules, see Billing Details. |
Supported Regions
The pay-as-you-go Spot Edition is currently available in the following regions:
China (Hangzhou), China (Shanghai), China (Beijing), China (Shenzhen), China (Hong Kong), Singapore, UK (London), Japan (Tokyo), Malaysia (Kuala Lumpur), Germany (Frankfurt), Indonesia (Jakarta), US (Virginia), and US (Silicon Valley).
Billing Details
Type | Billing Formula | Price |
SpotSQL job (an SQL or query acceleration job that uses the os_SpotQuota compute quota) | Total daily cost for SpotSQL jobs = Input data volume × SQL complexity × Unit price | The unit prices are as follows: Public Cloud: USD 0.0146/GB |
SpotSQL job that references a foreign table (an SQL job that uses os_SpotQuota and references an OTS or OSS foreign table) | Total daily cost for foreign-table SpotSQL jobs = Input data volume × Unit price | The unit prices are as follows: Public Cloud: USD 0.0044/GB |
SpotMapReduce job (a MapReduce job that uses os_SpotQuota) | Daily compute cost for SpotMapReduce jobs = Total billable hours × Unit price | The unit prices are as follows: Public Cloud: USD 0.023/CU/hour |
SpotSpark job (a Spark job that uses os_SpotQuota) | Daily compute cost for SpotSpark jobs = Total billable hours × Unit price | The unit prices are as follows: Public Cloud: USD 0.0347/CU/hour |
SpotMars job (a Mars job that uses os_SpotQuota) | Daily compute cost for SpotMars jobs = Total billable hours × Unit price | The unit prices are as follows: Public Cloud: USD 0.0347/CU/hour |
For more information about billing details and the billing rules for the pay-as-you-go , see Compute Costs (Pay-as-you-go).
For more information about switching between the MaxCompute pay-as-you-go Spot Edition and other compute resource types, see Switch between billing methods.
Important Notes
You must enable the pay-as-you-go before you can enable the Spot Edition. For more information about the pay-as-you-go , see Pay-as-you-go .
The Spot Edition covers only compute resources. Storage and download fees are charged based on the pricing of the pay-as-you-go .
Usage Instructions
Enable the MaxCompute pay-as-you-go .
For information about the steps to enable the pay-as-you-go , see Enable MaxCompute.
Enable the MaxCompute pay-as-you-go Spot Edition.
Go to the Alibaba Cloud MaxCompute pay-as-you-go Spot Edition activation page. Set the Product Type parameter to Pay-as-you-go Spot Edition. Configure the Region parameter as prompted, read and select the Terms of Service check box, and then click Activate Now.
ImportantYou cannot unsubscribe after you activate the Spot Edition. If you do not run jobs that use MaxCompute idle-time compute resources (
os_SpotQuota), you are not charged for the Spot Edition.View your pay-as-you-go Spot Edition compute resources.
Log on to the MaxCompute console and select the region in which you activated the Spot Edition from the top navigation bar.
In the navigation pane on the left, choose .
On the Quota Management page, check whether the primary quota
os_SpotQuota_pand the secondary quotaos_SpotQuotaare displayed. If they are displayed, you can use the Spot Edition compute resources.
Attach Spot Edition compute resources to a project.
For new projects, set the Default Quota parameter to
os_SpotQuotawhen you create the project.For existing projects, go to the Project Management page, click Manage in the Actions column of the target project, and then on the Project Configuration page, switch to the Parameter Settings tab and change the value of the Default Compute Quota parameter to
os_SpotQuota.
Run a Spot job (SpotJob).
By default, jobs that are submitted in a project that is bound to
os_SpotQuotaare Spot jobs. However, if you specify another runtime quota, such as thedefault pay-as-you-go quota, before the query, the job runs as a standard job.Similarly, in a project that is not bound to
os_SpotQuota, you can still run a Spot job by adding the following command before your query to explicitly set the compute quota toos_SpotQuota:set odps.task.wlm.quota=os_SpotQuota;For more information about how to specify a quota at the job level, see Specify Quota at the job level.
ImportantSuccessful Query Acceleration (MCQA) jobs cannot use this command to specify a compute quota. The resource consumption of these jobs is always billed based on the default compute quota that is attached to the project where the job runs. This applies to jobs such as query acceleration jobs that are initiated from or from DataWorks by creating ad hoc queries.
Monitor the job status and resource consumption.
You can use the job O&M feature in the MaxCompute console to view historical and running jobs. For more information, see Manage jobs. You can use the Quota Management feature to monitor the usage of idle-time compute resources. For more information, see View Quota consumption.
NoteMonitoring the resource consumption of query acceleration jobs is not supported.
You can view your pay-as-you-go off-peak consumption details.
For more information about how to view the consumption and usage details for the MaxCompute pay-as-you-go Spot Edition, see View bill details.
References
For more information about how to use the pay-as-you-go , see Pay-as-you-go. For more information about billing rules, see Compute Costs (Pay-as-you-go).