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
Help Center/ Huawei Cloud Flexus_Huawei Cloud Flexus RDS/ User Guide/ Working with FlexusRDS for MySQL/ Parameters/ Suggestions on Parameter Tuning for a FlexusRDS for MySQL Instance

Suggestions on Parameter Tuning for a FlexusRDS for MySQL Instance

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

Parameters are key configuration items in a database system. Improper parameter settings may adversely affect database performance. This section describes some important parameters for your reference. For details, visit the MySQL official website.

For details on how to modify FlexusRDS parameters on the console, see Modifying Parameters of a FlexusRDS for MySQL Instance.

Sensitive Parameters

  • innodb_flush_log_at_trx_commit

    Default value: 1

    Function: Controls the balance between strict ACID compliance for commit operations and higher performance. The default setting of 1 is required for full ACID compliance. Logs are written and flushed to disks at each transaction commit. If the value is set to 0, logs are written and flushed to disks once per second. If the value is set to 2, logs are written at each transaction commit and flushed to disks every two seconds.

    Impact: If this parameter is not set to 1, data security is not guaranteed. If the system fails, data may be lost.

    Recommended value for POC: 2

  • sync_binlog

    Default value: 1

    Function: Controls how often the MySQL server synchronizes binary logs to the disk. The default setting of 1 requires synchronization of the binary log to the disk at each transaction commit. If the value is set to 0, synchronization of the binary log to the disk is not controlled by the MySQL server but relies on the OS to flush the binary log to the disk. This setting provides the best performance. However, if a power failure occurs or the OS crashes, all binary log information in binlog_cache will be lost.

    Impact: If this parameter is not set to 1, data security is not guaranteed. If the system fails, binary logs may be lost.

    Recommended value for POC: 1000

  • innodb_buffer_pool_size

    Default value: Varies depending on the DB instance classes.

    Function: Specifies the size of the InnoDB buffer pool. The InnoDB buffer pool is used to cache table and index data. Increasing the value of this parameter reduces disk I/O.

    Impact: Setting this parameter to a large value may cause system breakdown. Exercise caution when changing this parameter value.

    Recommended value for POC: 70% to 75% of the memory for your DB instances with 32 GB memory or above

Performance Parameters

  • The values of innodb_spin_wait_delay and query_alloc_block_size are determined by the DB instance specifications. If you increase their values, database performance may be affected.
  • max_connections: indicates the total number of clients that can be concurrently connected. The default value of this parameter depends on the system architecture. System built-in connections occupy some connections specified by this parameter. To prevent concurrent connection conflicts, you are advised not to set this parameter to a value less than 30. This parameter cannot be set to a value smaller than the number of current connections.
  • The default values of the following parameters are determined by the DB instance specifications: innodb_buffer_pool_size, max_connections, and back_log. These parameter values are default before being specified.
  • The values of innodb_io_capacity_max and innodb_io_capacity are determined by the storage type. These parameter values are default before being specified.

Associated Parameters

  • character_set_server: If you change the value of this parameter, the system changes the value of collation_server accordingly.

    The parameters character_set_server and collation_server are correlated with each other. For example, for MySQL 5.7, when character_set_server is latin1, the default value of collation_server is latin1_swedish_ci. The collation_server value must start with latin1.

  • innodb_io_capacity: The value of this parameter must be less than or equal to the value of innodb_io_capacity_max. For example, if innodb_io_capacity_max is set to 2000, the maximum value of innodb_io_capacity is 2000.

Constraints on Parameter Modification

  • When the innodb_adaptive_hash_index and innodb_buffer_pool_size parameters are modified at the same time, the value of innodb_adaptive_hash_index will fail to be changed from OFF to ON.
  • If innodb_buffer_pool_instances is set to 2, the value of innodb_buffer_pool_size must be greater than or equal to 1 (unit: GB).

Other Parameters

  • max_prepared_stmt_count: limits the upper limit of prepared statements. Too many prepared statements consume server memory resources. If this parameter is set to a small value, your DB instance may be vulnerable to the denial of service (DoS) attacks. You are advised to change this parameter value based on service requirements.
  • The values of the following parameters will be adjusted based on kernel rules:
    • key_cache_age_threshold: automatically adjusted to a multiple of 100.
    • join_buffer_size and key_cache_block_size: automatically adjusted to multiples of 128.
    • query_prealloc_size, innodb_log_buffer_size, max_allowed_packet, and thread_stack: automatically adjusted to multiples of 1024.
    • read_buffer_size, read_rnd_buffer_size, binlog_cache_size, and binlog_stmt_cache_size: automatically adjusted to multiples of 4096.
  • innodb_strict_mode: restricts the InnoDB check policy. The default value is OFF.
  • binlog_rows_query_log_events: controls whether to write original SQL statements into binlogs. If this parameter is set to ON, database performance may deteriorate when a large amount of data is updated. Before you change the parameter value, consider the compatibility with tools such as Otter.

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