Esta página ainda não está disponível no idioma selecionado. Estamos trabalhando para adicionar mais opções de idiomas. Agradecemos sua compreensão.

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

Optimizing OS Parameters

Updated on 2022-06-11 GMT+08:00

Prerequisites

You have checked whether the OS parameters are set to the suggested values using gs_check. If not, modify them as required.

Memory Parameters

In the sysctl.conf file, change the value of vm.extfrag_threshold to 1000 (reference value). If the file does not contain memory parameters, you can add them manually.

vim /etc/sysctl.conf

Run the following command to make the modification take effect:

sysctl -p 

Network Parameters

  • In the sysctl.conf file, modify network parameters. If the file does not contain such parameters, add them manually. For details, see Table 1.
    vim /etc/sysctl.conf

    Run the following command to make the modification take effect:

    sysctl -p 
    Table 1 Network parameters

    Parameter

    Reference Value

    Description

    net.ipv4.tcp_timestamps

    0

    Specifies whether to enable quick reclamation of the sockets in TIME-WAIT state during TCP connection establishment. The parameter value 0 indicates that quick reclamation is disabled.

    net.ipv4.tcp_mem

    94500000 915000000 927000000

    94500000: If less than 94,500,000 pages are used by the TCP, the kernel is not affected.

    915000000: If more than 915,000,000 pages are used by the TCP, the kernel enters the memory pressure mode.

    927000000: If more than 927,000,000 pages are used by the TCP, the "Out of socket memory." message is displayed.

    net.ipv4.tcp_max_orphans

    3276800

    Specifies the maximum number of the orphan sockets.

    net.ipv4.tcp_fin_timeout

    20

    Specifies the default timeout period.

    net.ipv4.ip_local_port_range

    32768 65000

    Specifies the port range that can be used by TCP or UDP.

  • Use the ifconfig command to set the maximum transmission unit (MTU) of 10 GE NICs. The value 1500 is recommended because this setting improves the network bandwidth usage.
    NOTICE:

    When comm_tcp_mode is set to false for CNs or DNs, set the MTU sizes in the clusters to the same value. Otherwise, network communications may fail.

    For example:

    #ifconfig ethx mtu 1500
    #ifconfig ethx
    ethx   Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX
    inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx  Mask:xxx.xxx.xxx.0
    inet6 addr: fxxx::9xxx:bxxx:xxxa:1d18/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    RX packets:179849803 errors:0 dropped:0 overruns:0 frame:0
    TX packets:40492292 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:17952090386 (17120.4 Mb)  TX bytes:171359670290 (163421.3 Mb)
    NOTE:
    • ethx indicates the 10 GE service NIC used in the database.
    • The first command is used to set the MTU. The second command is used to verify that the MTU has been successfully set. The texts in bold indicate the value of the MTU.
    • Set the MTU as user root.
  • Use ethtool to set the length of the receiving (RX) queue and that of the sending (TX) queue for 10 GE NICs. The value 4096 is recommended because this setting improves the network bandwidth usage.

    For example:

    # ethtool -G ethx rx 4096 tx 4096
    # ethtool -g ethx
    Ring parameters for ethx:
    Pre-set maximums:
    RX:             4096
    RX Mini:        0
    RX Jumbo:       0
    TX:             4096
    Current hardware settings:
    RX:             4096
    RX Mini:        0
    RX Jumbo:       0
    TX:             4096
    NOTE:
    • ethx indicates the 10 GE service NIC used in the database.
    • The first command is used to set the lengths of the receiving and sending queues. The second command is to verify whether the lengths have been successfully set. If information similar to the example is displayed, the setting is successful.
    • Set the lengths of the receiving and sending queues as user root.

I/O Parameters

Set the hugepage attribute. To disable the transparent hugepage, add the following content to the end of the first kernel line in the /boot/grub/menu.lst file:

transparent_hugepage=never

Run the following command to make the modification take effect:

reboot

Usamos cookies para aprimorar nosso site e sua experiência. Ao continuar a navegar em nosso site, você aceita nossa política de cookies. Saiba mais

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback