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
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

Dynamic Acceleration

Updated on 2024-07-02 GMT+08:00

Preparations

Before dynamic acceleration, you need to perform two checks. Applications can be dynamically accelerated only when both conditions are met.

  1. Run the following command to check whether the binary file to be optimized can be located again:
    readelf -a application | grep .rela.text
    • If the binary file contains .rela.text, the file can be located again. In this case, the application can be optimized.

    • If the binary file does not contain .rela.text, to allow BOLT to re-arrange functions (in addition to re-arranging code within functions) in your program, you need to add --emit-relocs or -q to the final link step of your application.
  2. Run the hce-wae --check command to check whether an application supports dynamic acceleration.

    If 3 is displayed, dynamic acceleration is supported.

Procedure

In the following operations, the mysqld application in the /data/apps/mysql-8.0.28/bin directory is used as an example.

  1. Generate an instrumentation application and run it.
    1. Run the /data/hce-wae/dbo/gen_instrumentation /data/apps/mysql-8.0.28/bin/mysqld command to generate an instrumentation application.

      Command format: /data/hce-wae/dbo/gen_instrumentationApplication path

      The mysqld.inst instrumentation file is generated in the current directory.

    2. Run the instrumentation file to obtain the PID of the application process. In this example, the PID is 87042.

  2. Create a dynamic acceleration configuration file for mysqld.

    Each application to be optimized must have a configuration file. Workload Accelerator dynamically accelerates the application based on the configuration file.

    1. Run the following command to copy the default configuration file /data/hce-wae/config/mysqld.conf:
      [root@localhost]# cp /data/hce-wae/config/hce-wae-tmp.conf /data/hce-wae/config/mysqld.conf 
    2. Set the origin-exe field in the /data/hce-wae/config/mysqld.conf configuration file.
      origin-exe indicates the location of the application to be optimized. In this example, the location is /data/apps/mysql-8.0.28/bin/mysqld.
      [root@localhost]# vim /data/hce-wae/config/mysqld.conf 

  3. Use the configuration file and the PID to configure dynamic acceleration.

    Command format: hce-wae --conf [PID] [/path/to/config]

  4. Enable dynamic acceleration to optimize the instrumentation application.

    Command format: hce-wae --start [PID]

    You can view the optimization status from the --status parameter. If the status is Running, the process is being optimized. If the status is Finished, the process has been optimized.

    Command format: hce-wae --status [PID]

  5. Use the --snapshot parameter to generate an optimized .dbo binary snapshot file. In this example, the file is mysqld.dbo.

    The default snapshot path is /data/hce-wae/snapshot/. You can change the path in the configuration file as needed. You can use this snapshot file to run the application without repeated optimization.

  6. Terminate dynamic acceleration to stop application optimization.

    Command format: hce-wae --stop [PID]

CLI for Dynamic Acceleration

A CLI is provided for dynamic acceleration. Table 1 lists the supported commands.

Figure 1 Startup page of dynamic acceleration
Figure 2 Help page of dynamic acceleration
Table 1 CLI commands supported for dynamic acceleration

Command

How to Use

Description

list

list

Obtains the process information in the current environment, including the PID, PPID, and command information.

status

status <PID>

Queries ongoing dynamic acceleration tasks and their status. The following information is returned:

  • PID
  • Process name
  • Optimization count
  • Acceleration status (Initialized, DataCollecting, Optimizing, HotPatching, Done, or Failed)

check

check <PID>

Checks whether the current process supports static or dynamic acceleration and displays the text result.

show

show <PID>

Queries the process dependencies.

conf

conf <PID>

Configures the dynamic acceleration capability for the target process. After you run the command, configuration options are displayed in sequence. Configure the options as prompted.

start

start <PID>

Enables dynamic acceleration.

stop

stop <PID>

Stops dynamic acceleration.

snapshot

snapshot <PID>

Generates a dynamic acceleration snapshot.

quit

quit

Exits the CLI.

h/help

h/help

Shows help information.

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