All Products
Search
Document Center

E-MapReduce:View auto scaling cost analysis in a visualized manner

Last Updated:Aug 16, 2023

E-MapReduce (EMR) provides the cost analysis feature for task node groups of pay-as-you-go and preemptible instances. This feature helps you analyze the resource usage and cost allocation from multiple dimensions. This way, you can evaluate the cost savings brought by auto scaling and optimize the resource usage of your clusters. This topic describes how to view the auto scaling cost dashboard in the EMR console.

Prerequisites

  • The AliyunEMRManagedCostRole role is assigned to EMR as prompted in the console.

    You must assign the role to EMR by using an Alibaba Cloud account when you use the cost analysis feature for the first time.

  • A task node group that contains pay-as-you-go instances or preemptible instances is created in the cluster. For more information, see Add auto scaling rules.

Usage notes

  • The cost dashboard displays the cost data of the previous day. The cost data of the previous day is calculated at 06:00 every day.

  • The costs of a single node group are estimated values and may be different from the actual fees in the final bills. The actual fees that you need to pay based on the bills prevail.

  • The costs of the node groups that use saving plans cannot be analyzed.

Procedure

  1. Go to the Auto Scaling tab.

    1. Log on to the EMR console. In the left-side navigation pane, click EMR on ECS.

    2. In the top navigation bar, select the region where your cluster resides and select a resource group based on your business requirements.

    3. On the EMR on ECS page, find the desired cluster and click the name of the cluster in the Cluster ID/Name column.

    4. On the page that appears, click the Auto Scaling tab.

  2. Click the Auto Scaling Cost Analysis tab.

    On this page, you can view the auto scaling cost dashboard.

    Section

    Description

    PretaxGrossAmount/PretaxAmount

    The type of the cost data that you want to view.

    • PretaxAmount: displays the actual bills of all the resources in the cluster. By default, PretaxAmount is selected.

    • PretaxGrossAmount: displays the catalog prices of all the resources in the cluster.

    For more information about the actual bills and catalog prices, see Billing details.

    NodeGroup

    The task node group whose allocated cost you want to view. By default, All is selected.

    Note

    Only the task node groups of pay-as-you-go and preemptible instances are supported. Only the task node groups which have cost data are available.

    Time Range

    The time period of the data displayed in the dashboard. The default time range is the last 7 days. You can specify a time range to view the changes in costs and resources within the specified time period.

    Cost for yesterday-PretaxAmount-All

    The costs of elastic resources in this cluster.

    The cost data is calculated on the next day. Therefore, the data of the current week is unavailable on Monday, and the data of the current month is unavailable on the first day of the month.

    The day-over-day growth rate -PretaxAmount-All chart displays the comparison result between the cost of the previous day and the cost of the day before the previous day.

    Cost for this week (calendar week)-PretaxAmount-All

    Cost for this month (calendar month)-PretaxAmount-All

    The day-over-day growth rate -PretaxAmount-All

    Cost -PretaxAmount-All

    The cost trend.

    Cpu-All

    The changes in the total number of the cores of elastic nodes. Generally, the changes conform to the cost trend. If not, the unit cost of the cores is abnormal in the specified time period. You need to check whether resources that are more expensive are used.

    Cost of each nodeGroup -PretaxAmount

    The allocated cost in each task node group.

    Estimated cost savings if all nodes are spot instance -PretaxAmount-All

    The estimated cost savings based on the billing method of the nodes. This metric helps you analyze the cost savings if you change all the elastic nodes to preemptible instances. This way, you can optimize the resource usage of your clusters and the billing methods of elastic nodes.

FAQ

Why is no data displayed after I enable cost analysis?

  • The AliyunEMRManagedCostRole role is not assigned to EMR in Resource Access Management (RAM).

  • The cost data is displayed at 06:00 on the next day after the role is assigned to EMR. The day-over-day growth rate -PretaxAmount-All is available only after data is collected for two consecutive days.

Why is the monthly or weekly total cost not equal to the cost in actual bills?

The cost analysis feature calculates the cost of elastic resources after the required role is assigned to EMR. The cost data that was generated before the authorization is not collected.