Cost insights

Updated at:

Use the Cost Insights feature in ACS to view cost visualization dashboards for your clusters, namespaces, and applications.

Prerequisites

The Cost Insights feature is enabled. For more information, see Enable the Cost Insights feature.

Usage notes

After you enable Cost Insights, billing data appears at 08:00 the next day. You can select a time range from the drop-down menu in the upper-right corner to view cluster cost data for different periods.

Accessing cost insights

  1. Log on to the ACS console. In the left navigation pane, click Clusters.

  2. On the Clusters page, click the name of the target cluster. In the left navigation pane, choose Cost Suite > Cost Insights.

  3. On the Cost Insights page, click a tab to view the corresponding cost visualization dashboard.

Cluster cost analysis

Filters

image

Filter

No.

Description

Cost metric

①

The metric used for cluster cost statistics.

  • Actual billing cost with discount (default): When calculating costs, this metric sums the payable amount for all cloud resources in the cluster.

  • Original billing cost without discount: When calculating costs, this metric sums the list price for all cloud resources in the cluster.

For more information, see Bill details.
Note

The costs of applications in the cluster, including costs at the namespace and pod levels, are calculated based on the original billing cost without discount.

Time

②

The time range for the dashboard, which defaults to the last 7 days. You can set this to view cost and resource trends for different periods.

Cluster cost overview

image

Area

No.

Description

Cluster cost summary

①

This area shows cost statistics, including the cluster's spending for the previous day, the day-over-day growth rate, the cumulative spending for the current week, and the cumulative spending for the current month. These statistics are based on the billing cost of the cloud resources in this cluster.

Cumulative spending for the current week and month are calculated based on calendar weeks and months. Due to a T+1 delay in billing generation, cumulative weekly spending is not displayed on Mondays, and cumulative monthly spending is not displayed on the first day of each month.

The day-over-day growth rate compares yesterday's cluster cost with the cost from the day before. Green indicates a decrease, and red indicates an increase.

Cluster cost and resource waste trends

②

This trend chart shows cluster spending (yellow curve) and actual cluster capacity (blue curve). The two curves are typically correlated.

Inconsistent trends between the two curves indicate an anomaly in the cluster's unit core cost. Check for resources with excessively high spending.

Real-time cost estimation and allocation by namespace

③④

③ shows the real-time estimated cost for each namespace in the cluster. The namespace cost is the sum of the estimated costs of all pods within it. ④ shows the allocated cost for each namespace, which is the portion of the cluster's actual cost allocated to the namespace based on its estimated cost ratio.

Note
  • Namespace costs are calculated based on the original billing cost without discount.

  • Pods without configured CPU resource requests are not included in namespace cost statistics.

Discounts, vouchers, and other delayed billing policies can cause discrepancies between the namespace costs and the cluster's actual bill. You can allocate costs by multiplying the namespace's cost proportion by the total cluster cost.

Stability and efficiency analysis

image

Area

No.

Description

Total cluster resource usage

①

The number of pods for each QoS class and the total resource usage in the cluster.

Cluster pod resource utilization

②

This section shows basic information and resource utilization (Usage/Request) for all pods in the cluster. You can filter and sort this data to identify workloads with the highest or lowest resource usage.

Resource configuration of Burstable pods

③

Shows the resource configuration of pods with the Burstable QoS class. This feature supports filtering and sorting. You can use it to view the requests and limits for resources like CPU and memory for each Burstable pod. This helps you understand the cluster resources consumed by the pods and identify potential resource bottlenecks.

Resource usage of BestEffort pods

④

Shows the resource configuration of pods with the BestEffort QoS class. These pods generally pose a higher stability risk. You can filter and sort the list to check for any unexpected BestEffort pods to mitigate risks.

Important

The definition of ACS compute quality differs from the native Kubernetes QoS types. The dashboard displays native Kubernetes QoS types to help you assess the cluster's resource configuration.

Cluster cost analysis

image

Area

No.

Description

Cloud resource cost trends and proportions

①②

① shows the cost ratio of each cloud resource in the cluster. ② shows the cost trend for each cloud resource in the cluster.

A cluster may contain various types of cloud resources. Different usage methods and billing models can lead to cost variations. You can view spending on different cloud resources to inform cost-related decisions.

Total cluster cost trend

③

A trend of the total daily cost of the cluster.

Real-time cost estimation trends by namespace

④

Namespace cost is the aggregation of the original costs of all ACS pods within that namespace. User discounts, voucher deductions, and other delayed billing policies may cause discrepancies between the namespace's cost and the cluster's actual bill. You can allocate costs by multiplying the namespace's cost proportion by the total cluster cost.

Trends in cluster resource requests and utilization

⑤

Use cases:

  • Identify resource waste and assess cluster capacity.

  • Plan resource capacity for scenarios with periodic fluctuations, such as auto-scaling.

Trend chart legend:

  • Y-axis: The total computing resource capacity of the cluster, representing the amount of application resources the cluster can host.

  • Green bars: The total amount of computing resources requested by all applications in the cluster for the current hour.

  • Yellow bars: The actual computing resources used by processes in pod containers for the current hour (actual application resource usage).

Allocated but unused resources = Green bars - Yellow bars

Remaining allocatable cluster resources = Y-axis - Green bars

Analysis procedure:

  • Unallocated resource waste: Check the remaining allocatable resources to identify and utilize unallocated resources in the cluster. You can adjust the resource requests of pods in the cluster or appropriately downsize the cluster. We recommend that you maintain the remaining allocatable resources at about 20% of the total cluster resources.

  • Allocated but unused resource waste: Refer to the amount of allocated but unused resources. Use the rankings of wasteful applications and pods on the namespace dashboard to identify applications that have been allocated excessive resources but have low actual usage, and then reduce their resource requests.

  • Auto-scaling scenarios: In common scenarios where business loads show periodic fluctuations, you can plan resource capacity and configure appropriate auto-scaling policies based on the fluctuation patterns shown in the bar chart.

Detailed cluster billing information

⑥⑦

A list of daily cluster bills, broken down by cloud resource and cloud resource instance.

Namespace cost analysis

The namespace dashboard filters and displays resource and cost data for individual namespaces. A namespace often corresponds to a department or team in your organization.

Filters

image

Filter

No.

Description

Namespace

①

The namespace to analyze. Defaults to ALL, which indicates the entire cluster.

Cost metric

②

The metric used for cluster cost statistics.

  • Actual billing cost with discount (default): When calculating costs, this metric sums the payable amount for all cloud resources in the cluster.

  • Original billing cost without discount: When calculating costs, this metric sums the list price for all cloud resources in the cluster.

For more information, see Bill details.

Time

③

The time range for the dashboard, which defaults to the last 7 days. You can set this to view cost and resource trends for different periods.

Billing overview

image

Area

No.

Description

Resource statistics, cost estimation, and cost allocation for namespaces

①

You can use CPU and memory metrics to identify resource waste in a namespace. The following metrics are provided:

  • CPU resources

    • CPU resource usage: the number of CPU cores consumed by the current namespace.

    • CPU resource requests: the number of CPU cores allocated to the current namespace.

    • CPU resource utilization: the ratio of the namespace's CPU usage to its CPU requests.

  • Memory resources:

    • Memory resource usage: the amount of memory consumed by the current namespace.

    • Memory resource requests: the amount of memory allocated to the current namespace.

    • Memory resource utilization: the ratio of the namespace's memory usage to its memory requests.

②

The cost statistics of applications in the namespace.

  • Namespace real-time cost estimation: the real-time estimated cost of a namespace, which is the sum of the estimated costs of all pods in the namespace.

  • Namespace cost allocation: the allocated cost of a namespace, which is the portion of the cluster's actual cost allocated to the namespace based on its estimated cost ratio.

Cost details and trends

image

Area

No.

Description

Price per core per hour

①

A trend of the price per hour for each pod CPU core.

Trends for CPU/memory resource utilization

②

A trend of the CPU and memory resource utilization in the namespace.

Trends for resource requests and usage

③

A trend of resource allocation and actual consumption. The blue curve indicates allocated resources and the red curve indicates actual resource consumption.

The resources a container process consumes are often inconsistent with the pre-allocated resources. This chart (③) shows this relationship, helping you optimize resource allocation and reduce waste.

Application cost trends in the namespace

④

A trend of application costs in the namespace.

Total cost is the cost of the namespace calculated based on the original billing cost without discount within the specified time range.

This value represents the namespace's cost as a percentage of the total cluster cost.

image

Ranking

No.

Description

Pod ranking by resource requests

①

Analyzes applications with large pod resource requests in the cluster. This is useful for scenarios such as capacity planning.

Pod ranking by resource utilization

②

View pod application replicas with low resource utilization to help you find idle applications.

Pod ranking by idle resources

③

The idle resource rate is the proportion of unused computing resources to the allocated resources of a pod, which reflects the pod's resource waste.

By analyzing the pods that waste the most resources in a namespace, you can identify the main applications causing resource waste in the namespace. This helps you analyze the reasons for the waste and design targeted resource optimization strategies.

Application cost analysis

The application dashboard uses label wildcard matching to filter the applications that you want to analyze and view their cost and resource statistics. This dashboard focuses on scenario-based cost optimization for use cases such as big data, AI, and elastic workloads.

Label wildcard matching lets you monitor not only a single application but also multiple related applications. For example, in a big data workflow, you can add a consistent label to all applications in the workflow to analyze the cost of the entire business workflow.

Filters

image

Filter

No.

Description

Namespace

①

The namespace to analyze. Defaults to All, which indicates all namespaces.

Workload

②

Filter workloads by type and name. Defaults to All, which indicates all workloads.

Label

③

Enter the label of the application pod. You can use = or : to separate the key and value of the label. For example, app=ack-cost-exporter or app:ack-cost-exporter.

If a label key contains /, ., or -, you must replace these characters with _ and remove all quotation marks ("). For example, convert "sparkoperator.k8s.io/submission-id":"db08a66a-c0b7-4d32-8013-02ac4f8eff4c" to sparkoperator_k8s_io_submission_id:db08a66a-c0b7-4d32-8013-02ac4f8eff4c.

Time

④

The time range for the dashboard, which defaults to the last hour. You can set this to view cost and resource trends for different periods.

Billing overview

image

Area

No.

Description

Application cost and computing resource utilization

①

View the real-time costs of your applications and analyze their resource utilization.

  • Application cost: the cost of the selected application in the specified time range, calculated based on the original billing cost without discount.

  • Application replica count: Shows the minimum and maximum pod replica counts for the application.

  • Application running time: The total time the application has been running.

  • Core hours consumed: the total number of core hours consumed by the application.

  • Application resource share: the resource proportion of the application in the cluster or namespace.

  • Computing resource utilization: the CPU and memory utilization (Usage / Request).

Pod-level cost analysis

②

The resource status and real-time estimated cost of each pod within the application.

Trends for estimated application cost and pod scale

③

  • Estimated application cost trend: a trend of the application's hourly cost and the change in unit core-hour price over a period of time.

  • Application pod scale trend: a trend of the pod replica count for the application.

Trends for CPU, memory, and GPU requests and usage

④

Trend chart legend for CPU, memory, and GPU requests and usage:

  • Y-axis: The total computing resource capacity of the cluster, representing the amount of application resources the cluster can host.

  • Blue bars: The total amount of computing resources requested by all applications in the cluster for the current hour.

  • Yellow bar chart: The computing resources (Usage) used by processes in pods within the cluster for the current hour. This is the actual resource usage of the application.

Allocated but unused resources = Blue bars - Yellow bars

Remaining allocatable cluster resources = Y-axis - Blue bars

Procedure for waste analysis:

  • Unallocated resource waste: Check the remaining allocatable resources to identify and utilize unallocated resources in the cluster. You can adjust the resource requests of pods in the cluster or appropriately downsize the cluster. We recommend that you maintain the remaining allocatable resources at about 20% of the total cluster resources.

  • Allocated but unused resource waste: Refer to the amount of allocated but unused resources. In conjunction with the rankings of wasteful applications and pods on the namespace dashboard, identify applications that have been allocated excessive resources but have low actual usage, and then reduce their resource requests.

  • Auto-scaling scenarios: In common scenarios where business loads show periodic fluctuations, you can plan resource capacity and configure appropriate auto-scaling policies based on the fluctuation patterns shown in the bar chart.

Billing policy and pod usage

image

Ranking

No.

Description

Idle resource and cost rankings for application pods

①

This section helps you analyze departmental cost consumption and identify applications with high idle rates. The following metrics are provided:

  • Pod resource request ranking: Analyzes applications with large pod resource requests in the cluster. This is useful for scenarios such as capacity planning.

  • Pod resource utilization ranking: View pod application replicas with low resource utilization to help discover wasteful applications.

  • Pod idle resource ranking: The proportion of unused resources to the allocated resources of a pod, which reflects the pod's resource waste.

    By identifying the pods that waste the most resources in a namespace, you can locate the main applications causing resource waste in the namespace. This helps you analyze the reasons for the waste and design targeted resource optimization strategies.

FAQ

Why is no data displayed after I enable cost insights?

  • Check whether the RAM role authorization is complete. For more information, see Step 3 of the enablement guide. Cost analysis requires monitoring and cost data from the cluster. Monitoring data collection starts within 3 minutes after the feature is enabled, and cost data appears at 08:00 the following day.

  • Check whether a NAT gateway is configured for the cluster. In some regions, bills cannot be queried through internal endpoints. Make sure your cluster has public network access.

  • Day-over-day growth rate and Predicted Cost for Tomorrow are displayed only after cost data has been collected for two consecutive days.

Why does the sum of namespace costs not equal the actual bill?

Namespace costs are estimated based on list prices, not direct bill analysis. When the cluster bill includes vouchers, discounts, savings plans, or other deduction policies, the estimated namespace cost will deviate from the actual bill. To allocate costs accurately, multiply the namespace cost ratio by the total cluster cost.

Why does the bill not show all cloud resources used by the cluster?

Cost analysis includes only cloud resources used exclusively by this cluster. Shared cloud resources that are used by multiple clusters are not included in the billing statistics for cost analysis.

The Cost Insights feature relies on the cost allocation tags feature of the Expenses and Costs console. Specifically, it uses a specific tag with the key acs:acc:cluster_id on cloud resources to track and aggregate cluster costs. If you disable this tag on the Cost Allocation Tags page, cluster-level cost statistics stop working. To resolve this issue, re-enable the acs.aliyun.com and acs:acc:cluster_id tags on the Cost Allocation Tags management page.

Why are the cumulative costs for this month or week lower than the actual spending?

Cost Insights begins collecting cost data only after the Cost Insights component is enabled for the cluster. Data from before the component was enabled is not included.