Halaman ini belum tersedia dalam bahasa lokal Anda. Kami berusaha keras untuk menambahkan lebih banyak versi bahasa. Terima kasih atas dukungan Anda.

Easily Switch Between Product Types

You can click the drop-down list box to switch between different product types.

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
On this page

CPU Burst

Updated on 2024-08-16 GMT+08:00

If a CPU limit is set for the containers in a pod, the CPU usage of the containers cannot exceed the limit. Frequent CPU traffic limiting affects service performance and increases the long-tail response latency, especially for latency-sensitive services.

CPU burst is an elastic traffic limiting mechanism that allows temporarily exceeding the CPU limit to reduce the long-tail response time of services. When the CPU quota for a service in each CPU scheduling period is remaining, the system accumulates the CPU quota. If the CPU limit needs to be exceeded in subsequent scheduling periods, the accumulated CPU quota can be used.

  • If CPU burst is not enabled, the CPU quota for a container cannot exceed the limit, and the accumulated burst resources cannot be used.
    Figure 1 CPU burst not enabled
  • After CPU burst is enabled, the CPU quota for a container can exceed the limit to use the accumulated burst resources.
    Figure 2 CPU burst enabled

Notes and Constraints

  • Cluster version: CCE Turbo cluster v1.23.5-r0 or later
  • OS version: Huawei Cloud EulerOS 2.0
  • Volcano: v1.9.0 or later; hybrid deployment: enabled

Procedure

  1. Log in to the CCE console and click the cluster name to access the cluster console.
  2. In the navigation pane, choose Nodes. On the Node Pools tab page, locate the target node pool and choose More > Mixed configuration.

    Ensure that node pool hybrid deployment and traffic limit for CPU burst are enabled.

    NOTE:

    After CPU burst is disabled, this function is still enabled on the existing pods where CPU burst has been enabled. Disabling CPU burst takes effect only on new pods.

  3. Deploy a workload in a node pool where hybrid deployment has been enabled. Take Nginx as an example. Set requests to 2 and limits to 4, and create a Service that can be accessed in the cluster for the workload.

    apiVersion: apps/v1
    kind: Deployment
    metadata:
      name: nginx
      namespace: default
    spec:
      replicas: 1
      selector:
        matchLabels:
          app: nginx
      template:
        metadata:
          labels:
            app: nginx
          annotations: 
            volcano.sh/enable-quota-burst: "true"
            volcano.sh/quota-burst-time: "200000"
        spec:
          containers:
          - name: container-1
            image: nginx:latest
            resources:
              limits:
                cpu: "4"
              requests:
                cpu: "2"
          imagePullSecrets:
            - name: default-secret
    ---
    apiVersion: v1
    kind: Service
    metadata:
      name: nginx
      namespace: default
      labels:
        app: nginx
    spec:
      selector:
        app: nginx
      ports:
        - name: cce-service-0
          targetPort: 80
          nodePort: 0
          port: 80
          protocol: TCP
      type: ClusterIP

    Annotation

    Mandatory

    Description

    volcano.sh/enable-quota-burst

    Yes

    CPU burst is enabled for the workload.

    volcano.sh/quota-burst-time

    No

    To ensure CPU scheduling stability and reduce contention when multiple containers encounter CPU bursts at the same time, the default CPU Burst value is the same as the CPU Quota value, indicating that a container can use a maximum of twice the CPU Limit value. By default, CPU Burst is set for all service containers in a pod.

    For example, if the CPU Limit of a container is 4, the default CPU Burst value is 400000 (1 core = 100000), indicating that a maximum of four additional CPU cores can be used after the value of CPU limit is reached.

  4. Verify CPU burst.

    You can use the wrk tool to increase load of the workload and observe the service latency, traffic limiting, and CPU limit exceeding when CPU Burst is enabled and disabled, respectively.

    1. Run the following command to increase load of the pod. <service_ip> indicates the service IP address associated with the pod.
      # Download and install the wrk tool on the node.
      # The Gzip compression module is enabled in the Apache configuration to simulate the computing logic for the server to process requests.
      # Run the following command to increase the load. Note that you need to change the IP address of the target application.
      wrk -H "Accept-Encoding: deflate, gzip" -t 4 -c 28 -d 120  --latency --timeout 2s http://<service_ip>
    2. Obtain the pod ID.
      kubectl get pod -n <namespace> <pod_name> -o jsonpath='{.metadata.uid}'
    3. You can run the following commands on the node to view the traffic limiting status and CPU limit exceeding status. In the command, <pod_id> indicates the pod ID.
      cat /sys/fs/cgroup/cpu/kubepods/burstable/pod<pod_id>/cpu.stat
      Information similar to the following is displayed:
      nr_periods 0  # Number of scheduling periods
      nr_throttled 0  # Traffic limiting times
      throttled_time 0  # Traffic limiting duration (ns)
      nr_bursts 0 # CPU Limit exceeding times
      burst_time 0 # Total Limit exceeding duration
      Table 1 Result summary in this example

      CPU Burst

      P99 latency

      nr_throttled

      Traffic Limiting Times

      throttled_time

      Traffic Limiting Duration

      nr_bursts

      Limit Exceeding Times

      bursts_time

      Total Limit Exceeding Duration

      Not enabled

      2.96 ms

      986

      14.3s

      0

      0

      Enabled

      456 µs

      0

      0

      469

      3.7s

Kami menggunakan cookie untuk meningkatkan kualitas situs kami dan pengalaman Anda. Dengan melanjutkan penelusuran di situs kami berarti Anda menerima kebijakan cookie kami. Cari tahu selengkapnya

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback