This topic describes the cost components and benefits of Elastic Compute Service (ECS) and the recommended cost management solutions. These solutions can maximize cost effectiveness and ensure rapid business development.

Cost components

The cost of using ECS consists of the following components:
  • Ownership cost: the costs of resources and resource plans.
  • O&M cost: the labor costs incurred when you use ECS.
Cost components of ECS

Cost benefits of cloud migration

To build a data center, you must consider direct costs such as those related to hardware, network, electricity, and O&M. You must also consider scaling costs from upgrades and capacity increases, and the risk costs from the implementation of data backup and high availability. When you scale up your data center to meet growing business needs, the resource unit cost and complexity of the data center increase while its fault tolerance decreases. Additional costs occur if you select improper models.

Compared with self-managed data centers, cloud resources do not require hardware, physical environments, or labor. The unit cost of cloud resources is relatively linear and all resources allow on-demand access and delivery. Cloud resources also support multiple billing methods to further optimize costs.

Cost optimization suggestions

We recommend that you manage ECS costs from the following aspects:

Optimize resources

If you find resources with high costs, you can monitor the resources from multiple aspects, determine the reasons for the high costs, and then take specific optimization measures.

  1. Monitor resource usage.
    1. Monitor the usage of resources such as CPU, memory, disks, and bandwidth. Determine whether the current configuration is higher than required.
    2. Monitor idle resources to avoid waste. Idle resources include instances that are upgraded but not restarted, reserved instances that do not match pay-as-you-go instances, disks that are not attached to instances, and elastic IP addresses (EIPs) that are not associated with instances.
    3. Monitor resource usage cycles. If you want to use resources such as instances and disks on demand for an extended period of time, we recommend that you purchase the resources on a subscription basis or purchase resource plans to reduce costs.
    4. Monitor the lifecycle of resources. Pay attention to the expiration dates of subscription resources such as subscription instances, reserved instances, and storage capacity units (SCUs). Renew the resources in a timely manner.
  2. Select appropriate instance types.

    Instance types have significant impacts on ECS costs. Select the most cost-effective instance type and adjust the instance quantity based on business scenarios. This way, you can maximize resource utilization and reduce costs while meeting business needs.

    For example, assume that you are using 60 d1ne.14xlarge instances for short video scenarios. The monitoring results indicate that the memory usage of the instances is reasonable but the CPU utilization is relatively low. Use the following solution to increase CPU utilization while meeting your business requirements:

    To reduce the CPU-to-memory ratio, you can use 85 d2s.8xlarge instances whose CPU-to-memory ratio is 1:5.5 to replace 60 d1ne.14xlarge instances whose CPU-to-memory ratio is 1:4. The instance type is downgraded from 14xlarge to 8xlarge, which reduces costs by about 23%.

    For more information about instance configurations, see Best practices for instance type selection.

  3. Combine multiple billing methods.

    Different types of business have different requirements for resource usage cycles. Select an appropriate billing method for each type of business and combine billing methods to optimize costs.

    • Subscription and reserved instances are used for stable business workloads.
    • Pay-as-you-go instances are used for stateful and dynamic business workloads.
    • Preemptible instances are used for stateless and fault-tolerant business workloads.
  4. Use dedicated hosts to reuse ECS instance resources.

    For scenarios that have minimal requirements for CPU stability, such as development and test environments, you can use CPU-overprovisioned dedicated hosts to deploy more ECS instances of the same specifications to reduce the unit deployment cost.

    Stopped ECS instances that are deployed on dedicated hosts do not occupy resources. Therefore, during off-peak hours in the production environment, you can stop some ECS instances. Then, you can use other resources in the production environment to run test tasks whose periods are predictable, such as offline computing and automated tests.

Upgrade instance families

Hardware such as processors is continuously upgraded to improve performance and reduce costs. ECS is also upgraded to provide more cost-effective services.

Later instance types are more cost-effective than earlier instance types. For example, the following table describes the differences between g5.2xlarge and g6.2xlarge in performance and price.
Performance Price
  • The integer computing performance is improved by 40%.
  • The floating-point computing performance is improved by 30%.
  • The memory bandwidth is increased by 15%.
  • The memory idle latency is decreased by 40%.
  • The internal bandwidth is increased by 220%.
  • The cost of subscription ECS resources is reduced by 6%.
  • The cost of pay-as-you-go ECS resources is reduced by 43%.
To ensure that you can use the next-generation instance types in a timely manner, we recommend that you take the following measures:
  • Design robust applications that can run on different instance types.
  • Evaluate whether to upgrade instance types based on the updates on the official website of Alibaba Cloud.

Examples of instance family upgrade

You can use the following upgrade schemes to improve business performance without changing CPU and memory configurations and reduce instance cost by at least 15%.
Current instance family Recommended compatible instance family Recommended alternative instance family
sn1 and sn2
  • c6
  • g6
  • r6
  • c5 and sn1ne
  • g5 and sn2ne
  • r5 and se1ne
c4 hfc6 and c6 hfc5 and c5
ce4 r6 r5 and se1ne
cm4 hfc6 hfc5 and g5
n1, n2, and e3
  • c6
  • g6
  • r6
  • c5 and sn1ne
  • g5 and sn2ne
  • r5 and se1ne
  • t1
  • s1, s2, and s3
  • m1 and m2
  • c1 and c2
  • c6
  • g6
  • r6
  • c5 and sn1ne
  • g5 and sn2ne
  • r5 and se1ne

Regular cost saving measures

Cloud resources can be used on demand and save you the investment and cost of operating self-managed data centers. However, you must constantly optimize costs in your daily work to obtain the ideal results. You can refine the following typical operations to make a practical scheme:

  • Hold regular cost meetings. Review budget implementation with cost-related parties such as finance and R&D teams, evaluate optimization results, and improve optimization strategies on a regular basis.
  • Enforce the use of tags. Mark resources with tags of business, environment, and owners to keep track of daily costs.
  • Classify resources and select appropriate usage methods. For example, pay-as-you-go instances are preferred for deploying development and testing environments for short-term projects, and the instances are released in a timely manner after the projects are complete.
  • Avoid idle resources. Check resource usage on a regular basis and determine the notification and disposal workflows of idle resources.
  • Renew resources in a timely manner. Apply for a budget for subscription resources in advance to avoid the additional cost of purchasing and deploying new resources after existing resources are released upon expiration.

Implement automated O&M

Alibaba Cloud provides a variety of O&M services to help you improve O&M efficiency and reduce O&M labor costs. Examples:
  • Auto Scaling: constantly maintains instance clusters of different billing methods across instance types and zones. This service is ideal for scenarios where business workloads fluctuate from time to time.
  • Auto Provisioning: deploys instance clusters of different billing methods across instance types and zones. This service is ideal for scenarios where stable computing power must be provisioned in a quick manner and preemptible instances are used to reduce costs.
  • Operation Orchestration Service: defines a series of O&M operations in a template to perform O&M tasks in an efficient manner. This service is ideal for scenarios where event-driven O&M, scheduled O&M, batch O&M, or cross-region O&M is required.
  • Resource Orchestration Service: deploys and maintains stacks that contain multiple cloud resources and dependencies among the resources. This service is ideal for scenarios where delivery of an integrated system or environment clone is required.