Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

CPU Credits

Updated on 2025-01-26 GMT+08:00

Concept

CPU credits measure computing, storage, and network resource usage of an ECS. ECSs use CPU credits to ensure baseline performance, preventing issues caused by CPU overcommitment.

CPU-credit-based ECSs are suitable for the applications requiring baseline level of vCPU performance generally and burstable performance in case of traffic bursts.

Currently, general computing S6 and general computing-basic T6 ECSs run based on CPU credits (no additional billing is incurred). For details about the specifications, see General Computing S6 and General Computing-Basic ECSs.

Working Rules

After a CPU-credit-based ECS is created, the cloud platform automatically allocates initial CPU credits to the ECS for its burstable performance.

After the ECS runs, its credits are accrued or spent. When the actual computing performance of the ECS is higher than the baseline CPU performance, the CPU credits are spent to meet the performance requirements. When the actual computing performance is lower than the baseline CPU performance, the CPU credits are accrued until the CPU credit balance limit is reached.

NOTE:
  • CPU credits can be accrued. However, after the credits reach the CPU credit balance limit, any new credits that are earned will be discarded.
  • Initial credits are not counted in the CPU credit balance limit.
  • When an ECS starts to spend CPU credits, it preferentially uses the initial CPU credits.
  • One CPU credit is equal to one vCPU running at 100% usage for one minute.
  • General computing S6 ECS burstable performance is neither restricted by CPU credits nor billed for additional credits.
  • General computing-basic T6 ECSs are shared ECSs restricted by CPU credits. If the actual computing performance is higher than the baseline performance, the accrued credits are spent. When they are used up, the actual computing performance cannot exceed the baseline performance.

Related Terms

Table 1 Terms related to CPU credits (taking a T6 ECS as an example)

Term

Description

Example

Initial CPU credits

After a T6 ECS is created, the cloud platform automatically allocates CPU credits to this ECS. These credits are initial CPU credits. Initial CPU credits are allocated only after an ECS is created.

After a t6.large.1 is created, it has 60 initial CPU credits.

CPU credit balance limit

When the actual computing performance is lower than the baseline CPU performance, the CPU credits are accrued. The accrued credits will not expire on a running ECS. When the credits reach the maximum value allowed, which is specified by the CPU credit balance limit, any new credits that are earned will be discarded. The CPU credit balance limit varies depending on ECS flavors.

The CPU credit balance limit for a t6.large.1 ECS is 576. When its accrued CPU credits reach 576, no more credits will be accrued. When its accrued CPU credits are smaller than 576, the CPU credits can be accrued again.

CPU credit earn rate (credits/hour)

The number of CPU credits earned by an ECS per hour, which corresponds to CPU baseline.

One CPU credit is equal to one vCPU running at 100% usage for one minute.

The CPU credit earn rate of a t6.large.1 ECS is 24, indicating that a t6.large.1 ECS can earn 24 CPU credits per hour.

CPU baseline (%)

When the number of CPU credits that an ECS spends per minute is the same as the number of CPU credits that the ECS earns per minute, the ECS runs at the CPU baseline.

The CPU baseline of a t6.large.1 ECS is 40%. When the actual computing performance of a t6.large.1 ECS reaches 40%, the number of credits spent by the ECS per minute is the same as the number of credits earned by the ECS per minute.

Average CPU baseline (%)

When an ECS runs at CPU baseline, the computing performance of each vCPU is the average CPU baseline, which is calculated using the following formula:

Average CPU baseline = CPU baseline/Number of vCPUs

The CPU baseline of a t6.large.1 ECS is 40%, and the ECS has two vCPUs. Then, the average CPU baseline is 20%.

Spent CPU credits

When the actual computing performance of an ECS is higher than the baseline CPU performance, the CPU credits are spent to meet the performance requirements.

One CPU credit is spent for one vCPU running at 100% usage for one minute.

The formula for calculating the CPU credits spent per minute is as follows:

Number of CPU credits spent per minute = 1 CPU credit × Actual computing performance

When a t6.large.1 ECS runs at the computing performance of 20% for one minute, the ECS spends 0.2 CPU credits.

Accrued CPU credits

  • When the actual computing performance of an ECS is less than the baseline CPU performance, the number of CPU credits spent per minute is smaller than the number of CPU credits earned per minute. Therefore, the remaining CPU credits are accrued until the CPU credit balance limit is reached.
  • When the actual computing performance is higher than the baseline CPU performance, the number of CPU credits spent per minute is greater than the number of CPU credits earned per minute. In such a case, the ECS spends accrued CPU credits (initial CPU credits preferentially used) to comply with burstable CPU performance.

The formula for calculating the number of CPU credits accrued per minute is as follows:

Number of CPU credits accrued per minute = 1 CPU credit × (CPU baseline – Actual computing performance)

The CPU baseline of a t6.large.1 ECS is 40%. When the actual computing performance of the ECS is 10%, the ECS accrues 0.3 CPU credits per minute.

Impact of CPU Credits After an ECS Is Stopped

The change of CPU credits varies depending on the ECS billing mode and network type.

Table 2 Billing modes and CPU credits

Billing Mode

CPU Credit Change After an ECS Is Stopped

Yearly/Monthly

The existing CPU credits are retained and accrued until the CPU credit balance limit is reached.

Pay-per-use

The existing CPU credits are retained but not accrued.

Spot price

The existing CPU credits are retained but not accrued.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback