Skip to main content
Alibaba CloudCost Optimizationintermediate

Alibaba Cloud Cost Optimization

Optimize Alibaba Cloud spending with Subscription, Savings Plans, ARM instances, lifecycle rules, right-sizing, and FinOps practices.

CloudToolStack Team22 min readPublished Mar 14, 2026

Prerequisites

  • Alibaba Cloud account with billing access
  • Basic understanding of cloud pricing models

Alibaba Cloud Cost Optimization

Cost optimization on Alibaba Cloud requires a systematic approach combining pricing model selection, resource right-sizing, architectural decisions, and continuous monitoring. Alibaba Cloud offers aggressive pricing, particularly for Asia-Pacific workloads, with multiple discount mechanisms including Subscription commitments, Savings Plans, Preemptible Instances, and Resource Packs. Organizations that implement cost optimization best practices typically achieve 30-60% savings compared to unoptimized Pay-As-You-Go spending.

Unlike some cloud providers where cost optimization is an afterthought, Alibaba Cloud has built cost efficiency into the platform architecture. Features like the Yitian 710 ARM processor (delivering 30% better price-performance than x86), ESSD AutoPL disks (automatically adjusting performance to match workload needs), and PolarDB Serverless (scaling database capacity with zero idle costs) provide cost optimization at the infrastructure level. Combined with pricing discounts and operational best practices, these features enable significant savings without sacrificing performance or reliability.

This guide covers pricing models, compute optimization, storage optimization, network cost reduction, database efficiency, tagging and allocation, and FinOps practices for managing cloud costs at scale.

Understanding Alibaba Cloud Pricing

Alibaba Cloud offers several pricing models. Understanding when to use each model is the foundation of cost optimization:

Pay-As-You-Go (PostPaid)

The most flexible pricing model — pay by the hour or second with no commitment. While convenient, Pay-As-You-Go is the most expensive option for sustained usage. Use it for development, testing, short-term workloads, and resources with unpredictable lifespans.

Subscription (PrePaid)

Commit to 1-month to 3-year terms for significant discounts. Typical savings:

  • 1 month: 15% savings over Pay-As-You-Go
  • 6 months: 25-30% savings
  • 1 year: 35-45% savings
  • 3 years: 50-65% savings

Subscription works well for production workloads with predictable resource needs. The discount applies to the instance/resource type committed. Be cautious about over-committing — unused Subscription resources continue to incur charges.

Savings Plans

Commit to a consistent hourly spend (in USD or RMB) for 1 or 3 years. Savings Plans provide more flexibility than Subscription because the discount applies automatically to any eligible compute usage (ECS, ECI, ACK), regardless of instance type, family, or even region. This flexibility makes Savings Plans ideal for environments where workload composition changes over time.

Preemptible Instances

Up to 90% cheaper than Pay-As-You-Go for interruptible workloads. Preemptible instances may be reclaimed with 5 minutes notice when the underlying capacity is needed. Perfect for:

  • Batch processing and data analytics
  • CI/CD build runners
  • Stateless web servers behind load balancers
  • Machine learning training (with checkpointing)
  • Development and testing environments
bash
# Check current spot pricing
aliyun ecs DescribeSpotPriceHistory \
  --InstanceType ecs.g7.2xlarge \
  --NetworkType vpc \
  --ZoneId cn-hangzhou-g \
  --StartTime "2026-03-13T00:00:00Z" \
  --EndTime "2026-03-14T00:00:00Z"

# Create a preemptible instance with maximum price
aliyun ecs CreateInstance \
  --InstanceType ecs.g7.2xlarge \
  --SpotStrategy SpotWithPriceLimit \
  --SpotPriceLimit 0.15 \
  --SpotDuration 0 \
  --ImageId ubuntu_22_04_x64_20G_alibase \
  --VSwitchId vsw-bp1****

Savings Plans vs Subscription

If your compute workloads are stable (same instance types for months), Subscription provides deeper discounts. If your workloads change frequently (different instance types, families, or regions), Savings Plans provide better value because the discount follows your spending rather than being locked to specific resources. Many organizations use a combination — Subscription for stable baseline workloads and Savings Plans for variable workloads.

Compute Optimization

Compute costs (ECS, ACK, ECI) typically represent 40-60% of total cloud spending. Focus optimization efforts here first:

Right-Sizing

Right-sizing means matching instance specifications to actual workload requirements. CloudMonitor provides CPU, memory, network, and disk utilization metrics that reveal over-provisioned resources:

  • CPU utilization consistently below 20%: consider downsizing to a smaller instance
  • Memory utilization below 30%: consider switching from r-series (memory optimized) to g-series (general purpose)
  • Network utilization minimal: ensure you are not paying for oversized bandwidth packages
bash
# Query average CPU utilization over 7 days
aliyun cms DescribeMetricLast \
  --Namespace acs_ecs_dashboard \
  --MetricName CPUUtilization \
  --Dimensions '[{"instanceId":"i-bp1****"}]' \
  --Period 86400

# List instances with low CPU utilization (use CloudMonitor bulk query)
aliyun cms DescribeMetricList \
  --Namespace acs_ecs_dashboard \
  --MetricName CPUUtilization \
  --Period 3600 \
  --StartTime "2026-03-07T00:00:00Z" \
  --EndTime "2026-03-14T00:00:00Z"

ARM Instances (Yitian 710)

Alibaba Cloud's custom Yitian 710 ARM processor delivers outstanding price-performance for cloud-native workloads. The g8y (general purpose), c8y (compute optimized), and r8y (memory optimized) instance families using Yitian 710 provide approximately 20-30% better price-performance compared to equivalent x86 instances.

Most modern applications (web servers, microservices, databases, and application servers running on Java, Python, Node.js, Go, or .NET 6+) work without modification on ARM instances. Container workloads using multi-architecture images can seamlessly run on ARM node pools. If your workload is compatible, switching to ARM instances is one of the simplest and most impactful cost optimization strategies.

Auto Scaling

Configure Auto Scaling groups to automatically adjust capacity based on demand. This eliminates the need to provision for peak capacity — scale up when demand increases and scale down during quiet periods:

  • Use target tracking scaling policies based on CPU utilization (60-70% target is a good starting point)
  • Configure scheduled scaling for predictable traffic patterns (e.g., scale up before business hours)
  • Set appropriate cooldown periods to prevent scaling thrashing
  • Mix On-Demand and Preemptible instances in scaling groups for cost optimization

Storage Optimization

Storage costs grow over time as data accumulates. Implement these strategies to control storage spending:

OSS Lifecycle Rules

Configure lifecycle rules to automatically transition objects to cheaper storage classes based on age. A well-designed lifecycle policy can reduce OSS costs by 40-70%:

  • Standard to IA after 30 days (60% storage cost reduction)
  • IA to Archive after 90 days (additional 50% reduction)
  • Archive to Cold Archive after 180 days (additional 40% reduction)
  • Delete objects after the retention period expires
  • Abort incomplete multipart uploads after 3-7 days

ECS Disk Optimization

Choose the right disk type for each workload:

  • ESSD PL0: For development, testing, and low-IOPS workloads. 50% cheaper than PL1.
  • ESSD AutoPL: For production workloads with variable I/O patterns. Automatically adjusts performance level based on demand, preventing over-provisioning.
  • Ultra Cloud Disk: For cold data, logs, and archives. 80% cheaper than ESSD but much lower IOPS.

Regularly audit disk utilization and resize or delete unused disks. Unattached disks (not attached to any instance) continue to incur storage charges.

bash
# Find unattached disks (potential waste)
aliyun ecs DescribeDisks \
  --Status Available \
  --Category cloud_essd \
  --RegionId cn-hangzhou \
  --output cols=DiskId,Size,Category,CreationTime

Snapshot Management

Snapshots accumulate over time and can become a significant cost. Implement snapshot management policies:

  • Set automatic snapshot policies with retention limits (e.g., keep only the last 30 daily snapshots)
  • Delete manual snapshots that are no longer needed
  • Use incremental snapshots — each snapshot only stores changes since the previous snapshot
  • Review snapshot usage monthly and clean up orphaned snapshots from deleted instances

Network Cost Reduction

Network costs (data transfer, bandwidth, EIP) can be significant, especially for applications serving large volumes of content:

  • Use internal endpoints: Always use internal endpoints (oss-internal, rds-internal) for service-to-service communication within the same region. Internal traffic is free.
  • CDN for content delivery: Route static content through Alibaba Cloud CDN. CDN egress is 40-50% cheaper than direct OSS or ECS egress, and response times are faster.
  • Shared bandwidth packages: If you have multiple EIPs, use a Shared Bandwidth Package to pool bandwidth. This is cheaper than purchasing individual bandwidth for each EIP.
  • Traffic billing optimization: Choose between PayByBandwidth (fixed monthly cost) and PayByTraffic (usage-based) based on your traffic patterns. PayByBandwidth is cheaper for sustained, predictable traffic; PayByTraffic is cheaper for variable or low traffic.
  • VPC endpoints (PrivateLink): Use PrivateLink to access cloud services over the private network, eliminating the need for NAT Gateway or EIP for service access.

Database Cost Optimization

Database costs often represent 20-30% of total cloud spending. Optimize with:

  • Right-size instances: Use CloudDBA and Performance Insights to identify over-provisioned databases. Many databases run with less than 20% CPU utilization.
  • Read replicas vs bigger instances: It is often cheaper to add read replicas than to upgrade to a larger instance class. Read replicas also improve availability.
  • PolarDB Serverless: For workloads with variable demand, PolarDB Serverless scales from 1 to 32 PCUs automatically, with zero idle cost when there are no queries. This is ideal for dev/test databases and applications with unpredictable traffic.
  • Archive old data: Move historical data to OSS and query it with Data Lake Analytics. This reduces active database size, improves performance, and lowers costs.
  • Connection pooling: Use connection pooling to reduce the number of active connections, potentially allowing a smaller instance size.

Unused Resources

The largest source of cloud waste is unused resources — instances running but not serving traffic, unattached disks, unused EIPs, idle load balancers, and over-provisioned databases. Schedule a monthly review to identify and eliminate unused resources. Even a simple script that checks for instances with less than 5% average CPU utilization can reveal significant savings opportunities.

Tagging and Cost Allocation

Effective cost management requires visibility into which teams, projects, and environments are driving costs. Tags are the primary mechanism for cost allocation on Alibaba Cloud:

bash
# Enforce tagging with Tag Policy
aliyun resourcemanager CreatePolicy \
  --PolicyName "RequiredTags" \
  --PolicyType TagPolicy \
  --PolicyDocument '{
    "tags": {
      "Environment": {
        "tag_key": {"@@assign": "Environment"},
        "tag_value": {
          "@@assign": ["production", "staging", "development"]
        },
        "enforced_for": {
          "@@assign": ["ecs:instance", "rds:instance", "oss:bucket"]
        }
      },
      "CostCenter": {
        "tag_key": {"@@assign": "CostCenter"},
        "enforced_for": {
          "@@assign": ["ecs:instance", "rds:instance"]
        }
      }
    }
  }'

# Query costs by tag
aliyun bssopenapi QueryInstanceBill \
  --BillingCycle "2026-03" \
  --ProductCode ecs \
  --Tag.1.Key "Environment" \
  --Tag.1.Value "production"

Monitoring and Alerts

Set up cost monitoring to catch spending anomalies before they become expensive surprises:

  • Budget alerts: Configure budget alerts in the Billing Management console to receive notifications when spending exceeds thresholds (e.g., 50%, 80%, 100% of monthly budget).
  • Daily cost emails: Enable daily cost summary emails for visibility into spending trends.
  • Cost anomaly detection: Monitor for unexpected cost spikes using billing APIs and custom CloudMonitor alerts.
  • Resource inventory: Regularly audit resource counts by region, service, and tag. Identify resources without cost center tags for allocation review.

FinOps Practices

Building a FinOps culture ensures cost optimization is continuous rather than a one-time effort:

  • Shared visibility: Give engineering teams access to their own cost dashboards. Teams that can see their costs make better optimization decisions.
  • Commitment planning: Review and adjust Savings Plan and Subscription commitments quarterly. Align commitment levels with forecasted usage, not current usage.
  • Architecture reviews: Include cost as a design criterion in architecture reviews. Evaluate the cost impact of architectural decisions alongside performance and reliability.
  • Automation: Automate resource lifecycle management — auto-stop dev/test instances outside business hours, auto-delete temporary resources, and auto-scale production workloads.
  • Regular optimization sprints: Dedicate time each quarter for cost optimization reviews. Focus on the top 5 spending categories for maximum impact.
bash
# Schedule auto-stop for development instances (using Cloud Assistant)
# Create a stop command
aliyun ecs CreateCommand \
  --Name "stop-dev-instances" \
  --Type RunShellScript \
  --CommandContent "shutdown -h now" \
  --Description "Stop development instances at end of business"

# Schedule the command to run at 7 PM daily
aliyun ecs InvokeCommand \
  --CommandId c-**** \
  --InstanceId '["i-bp1****","i-bp2****"]' \
  --Timed true \
  --Frequency "0 19 * * 1-5" \
  --RepeatMode "Period"

# Start instances at 8 AM
aliyun ecs InvokeCommand \
  --CommandId c-**** \
  --InstanceId '["i-bp1****","i-bp2****"]' \
  --Timed true \
  --Frequency "0 8 * * 1-5" \
  --RepeatMode "Period"

Cost Optimization Checklist

Start with these high-impact actions: (1) Convert stable Pay-As-You-Go instances to Subscription or Savings Plans for 30-50% savings. (2) Switch compatible workloads to ARM (g8y) instances for 20-30% savings. (3) Implement OSS lifecycle rules for 40-70% storage savings. (4) Use internal endpoints and CDN to reduce data transfer costs. (5) Delete unused resources (unattached disks, idle EIPs, unused snapshots). Most organizations can achieve 30-50% cost reduction by implementing just these five actions.

Key Takeaways

  1. 1Subscription pricing provides 30-65% savings compared to Pay-As-You-Go for predictable workloads.
  2. 2Yitian 710 ARM instances (g8y) deliver 20-30% better price-performance for most cloud-native applications.
  3. 3OSS lifecycle rules can reduce storage costs by 40-70% through automatic tier transitions.
  4. 4Internal endpoints eliminate egress charges for service-to-service communication within the same region.

Frequently Asked Questions

What are the biggest cost savings opportunities?
The five highest-impact actions: (1) Convert stable Pay-As-You-Go instances to Subscription for 30-50% savings. (2) Switch compatible workloads to ARM instances for 20-30% savings. (3) Implement OSS lifecycle rules for 40-70% storage savings. (4) Use internal endpoints and CDN for data transfer savings. (5) Delete unused resources. Most organizations achieve 30-50% total cost reduction.
How do Alibaba Cloud prices compare to AWS?
Alibaba Cloud is generally 20-40% cheaper than AWS for equivalent services in Asia-Pacific regions. ECS instances, OSS storage, and data transfer are particularly competitive. For China-based workloads, Alibaba Cloud pricing is significantly lower due to regional infrastructure investment. However, pricing varies by service and region — always compare specific configurations.

Written by CloudToolStack Team

Cloud engineers and architects with hands-on experience across AWS, Azure, and GCP. We write guides based on real-world production patterns, not just documentation rewrites.

Disclaimer: This guide is for educational purposes. Cloud services change frequently; always refer to official documentation for the latest information. AWS, Azure, and GCP are trademarks of their respective owners.