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
On this page
Help Center/ Huawei Cloud EulerOS/ User Guide/ Tools/ Pod Bandwidth Management Tool

Pod Bandwidth Management Tool

Updated on 2024-09-14 GMT+08:00

In hybrid service deployments, the pod bandwidth management function schedules resources based on QoS levels to improve network bandwidth utilization. HCE provides oncn-tbwm for you to manage the pod bandwidth. You can run the tbwmcli commands to limit the network rate in packet sending and receiving.

Prerequisites

Before using the bandwidth management tool, ensure that the virtual NIC ifb0 is not in use, and load the ifb driver.

Constraints

  • Only HCE 2.0 of x86 architecture supports the tbwmcli commands.
  • Only the root user is allowed to run the tbwmcli commands.
  • The tbwmcli commands can be used to enable the QoS function for only one NIC at a time.
  • After the NIC is removed and then inserted, the original QoS rules will be lost. In this case, you need to manually reconfigure the QoS function.
  • tbwmcli commands are not supported for cgroup v2.
  • Upgrading the oncn-tbwm software package does not affect the enabling status before the upgrade. Uninstalling the oncn-tbwm software package will disable the QoS function for all devices.
  • Only NIC names containing digits, letters, hyphens (-), and underscores (_) can be identified.
  • Bandwidth limiting may cause protocol stack memory overstock. If this happens, the transport layer protocol will perform backpressure. For UDP and other protocols that do not have backpressure mechanisms, packet loss, ENOBUFS, and inaccurate traffic limiting may occur.
  • Network rate limiting for packet receiving depends on the TCP backpressure capability. In scenarios where TCP is not used, network packets have been received by the target NIC, and network rate limiting is not supported.
  • The tbwmcli, tc, and NIC commands cannot be used together. You can only run the tbwmcli commands for rate limiting. For example, if the tc qdisc rule has been configured for a NIC, enabling the QoS function for the NIC may fail.

How to Use

  1. Install the oncn-tbwm software package.
    1. Confirm that the repository is configured correctly.

      Check whether the parameters in the /etc/yum.repos.d/hce.repo file are configured correctly. The correct configuration is as follows:

      [base]
      name=HCE $releasever base
      baseurl=https://repo.huaweicloud.com/hce/$releasever/os/$basearch/
      enabled=1
      gpgcheck=1
      gpgkey=https://repo.huaweicloud.com/hce/$releasever/os/RPM-GPG-KEY-HCE-2
      
      [updates]
      name=HCE $releasever updates
      baseurl=https://repo.huaweicloud.com/hce/$releasever/updates/$basearch/
      ......
    2. Run yum install oncn-tbwm to install the oncn-tbwm software package.
    3. Verify the oncn-tbwm software package.
      • Run tbwmcli -v. If the following information is displayed, the installation is successful:
        version: 1.0
      • Check whether the following oncn-tbwm service components exist.
        /usr/bin/tbwmcli
        /usr/share/tbwmcli
        /usr/share/tbwmcli/README.md
        /usr/share/tbwmcli/bwm_prio_kern.o
        /usr/share/tbwmcli/tbwm_tc.o
  2. Run the tbwmcli command as required.
    Table 1 tbwmcli commands

    Command

    Description

    tbwmcli -e ethx

    tbwmcli -d ethx egress

    Enables or disables the packet sending QoS for a NIC.

    Example: Enabling the packet sending QoS for eth0

    tbwmcli -e eth0
    enable eth0 egress success

    Example: Disabling the packet sending QoS for eth0

    tbwmcli -d eth0 egress
    disable eth0 egress success

    tbwmcli -i ethx online/offline

    tbwmcli -d ethx ingress

    Enables or disables the packet receiving QoS for a NIC.

    Example: Enabling the packet receiving QoS for eth0 and setting eth0 as an online NIC

    tbwmcli -i eth0 online
    enable eth0 ingress success, dev is online

    Example: Enabling the packet receiving QoS for eth0 and setting eth0 as an offline NIC

    tbwmcli -i eth0 offline
    enable eth0 ingress success, dev is offline
    NOTE:

    Packet receiving QoS cannot be set for multiple offline NICs at the same time. Packet receiving QoS can only be set for one offline NIC but multiple online NICs.

    Example: Disabling the packet receiving QoS for eth0

    tbwmcli -d eth0 ingress
    disable eth0 ingress success

    tbwmcli -d ethx

    Forcibly disables QoS for a NIC and disables ifb.

    Example: Forcibly disabling QoS for eth0 and disabling ifb

    tbwmcli -d eth0
    disable eth0 success

    tbwmcli -p istats/estats

    Displays the internal statistics of the packet sender and receiver.

    Example: Displaying the internal statistics of the packet receiver

    tbwmcli -p istats
    offline_target_bandwidth: 94371840online_pkts: 3626190offline_pkts: 265807online_rate: 0offline_rate: 13580offline_prio: 0

    Example: Displaying the internal statistics of the packet sender

    tbwmcli -p estats
    offline_target_bandwidth: 94371840online_pkts: 4805452offline_pkts: 373961online_rate: 0offline_rate: 19307offline_prio: 1

    tbwmcli -s path <prio>

    tbwmcli -p path

    Sets or queries the QoS priority of a cgroup.

    Currently, only two QoS priorities can be set.

    • 0: Sets the cgroup online.
    • -1: Sets the cgroup offline.

    Example: Setting the priority of the test_online cgroup to 0

    tbwmcli -s /sys/fs/cgroup/test_online 0
    set prio success

    Querying the priority of the test_online cgroup

    tbwmcli -p /sys/fs/cgroup/test_online
    prio is 0

    tbwmcli -s bandwidth <low, high>

    tbwmcli -p bandwidth

    Sets or queries the offline bandwidth range.

    Example: Setting the offline bandwidth range to 30 Mbit/s to 100 Mbit/s

    tbwmcli -s bandwidth 30mb,100mb
    set bandwidth success

    Example: Querying the offline bandwidth range

    tbwmcli -p bandwidth
    bandwidth is 31457280(B),104857600(B)

    tbwmcli -s waterline <val>

    tbwmcli -p waterlin

    Sets or queries the online network bandwidth threshold.

    Example: Setting the online network bandwidth threshold to 20 Mbit/s

    tbwmcli -s waterline 20mb
    set waterline success

    Example: Querying the online network bandwidth threshold

    tbwmcli -p waterline
    waterline is 20971520 (B)

    tbwmcli -p devs

    Checks the enabling status of all NICs in the system.

    tbwmcli -p devs
    lo      Egress : disabled
    lo      Ingress : disabled
    eth0    Egress : disabled
    eth0    Ingress : enabled, it's offline
    ifb0    Egress : enabled

    tbwmcli -c

    Forcibly deletes the QoS settings of all NICs.

    modprobe ifb numifbs=1

    Loads ifb.

    rmmod ifb

    Uninstalls ifb.

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