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

Enabling or Disabling Hyper-Threading

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

Scenarios

When purchasing an x86 ECS, you can enable or disable hyper-threading by specifying CPU options. If you do not specify it, hyper-threading is enabled by default.

When you purchase x86 ECSs, you can determine whether to enable hyper-threading based on your service scenarios:
  • If you require CPU cores to concurrently process a large amount of data and background tasks, enabling hyper-threading can greatly improve computing performance.
  • For compute-intensive or high-performance computing (HPC) applications, such as computational materials science, disabling hyper-threading is a better choice.

You can enable or disable hyper-threading when purchasing x86 ECSs or modifying their specifications.

Background

The processors of x86 ECSs support hyper-threading, which enables two threads to run concurrently on each CPU core. Each thread is represented as a virtual CPU (vCPU). A vCPU is a virtual logical core. After hyper-threading is enabled, a CPU core contains two vCPUs.

A flavor defines the number of vCPUs. You can query the number of vCPUs that an x86 ECS has by referring to Querying the Number of vCPUs of an ECS.

Hyper-threading is enabled for most x86 ECSs by default. If hyper-threading is disabled during the x86 ECS creation or specification modification, the number of vCPUs queried from the x86 ECS is half of the number of vCPUs defined by the ECS flavor.

For example, for an ECS with the c7.xlarge.2 flavor (hyper-threading enabled by default), it has four vCPUs, which means four hyperthreads. After hyper-threading is disabled, it has two vCPUs, which means two CPU cores.

Notes and Constraints

  • After an x86 ECS is purchased, you cannot directly change its hyper-threading status. To do so, you can change its flavor to change the hyper-threading status.
  • Enabling or disabling hyper-threading is free of charge.
  • For details about ECS flavors that support hyper-threading, see A Summary List of x86 ECS Specifications.

Enabling or Disabling Hyper-Threading (During ECS Purchase)

  1. Log in to the management console and access the Buy ECS page.

    Configure basic, network, and advanced settings for ECSs based on service requirements. For details, see Purchasing an ECS in Custom Config Mode.

  2. Select Configure now to configure advanced options.
  3. Select Specify CPU options.
    Figure 1 Specifying CPU options
  4. Set Threads per Core.
    This parameter is displayed when Specify CPU options is selected. You can select a parameter value from the drop-down list.
    • 1: one thread per core, which means hyper-threading is disabled.
    • 2 (default value): two threads per core, which means hyper-threading is enabled.
  5. Click Next: Confirm to confirm the settings and complete the ECS purchase.

    After purchasing an ECS, you can query the hyper-threading status by referring to the cpu_options parameter in Querying Details About an ECS.

Enabling or Disabling Hyper-Threading (During ECS Flavor Change)

  1. Log in to the management console.
  2. Click in the upper left corner and select your region and project.
  3. Click . Under Compute, click Elastic Cloud Server.
  4. On the Elastic Cloud Server page, locate the row containing the target ECS and choose More > Modify Specifications in the Operation column.

    The Modify ECS Specifications page is displayed.

  5. Select a new ECS type and flavor.

    Before modifying the specifications, stop the ECS or select Authorize ECS auto-stop.

    Figure 2 Modifying ECS specifications
  6. Click Next.
  7. Confirm the settings, read and select the agreement, and then click Submit Application.

    After modifying ECS specifications, you can query the hyper-threading status by referring to the cpu_options parameter in Querying Details About an ECS.

Querying the Number of vCPUs of an ECS

You can log in to an ECS and view the number of its vCPUs.

  • For Linux ECSs:
    1. Log in to a Linux ECS.
    2. Run the following command to view the number of logical cores of the ECS:

      lscpu

      As shown in Figure 3, CPU(s) indicates the number of logical cores.

      Figure 3 Viewing the result
  • For Windows ECSs:
    1. Log in to a Windows ECS.
    2. Choose Control Panel > Device Manager and expand Processors to view the number of logical cores (threads) of the ECS.
      Figure 4 Viewing the result

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