All Products
Search
Document Center

:Overview

Last Updated:Dec 20, 2023

This white paper provides guidelines for you to optimize the performance of your ApsaraDB RDS instance from various dimensions. These dimensions include instance configuration selection, parameter reconfiguration, and monitoring and alerting.

ApsaraDB RDS for MySQL uses AliSQL. AliSQL is an independent MySQL branch that is developed by Alibaba Cloud. AliSQL provides all features of MySQL Community Edition and a number of advanced features that are similar to MySQL Enterprise Edition. These advanced features include enterprise-grade backup and restoration, thread pool, and parallel query. For more information about AliSQL, see Overview of AliSQL features.

To deliver high performance, ApsaraDB RDS for MySQL provides a variety of features, such as fast query cache, binlog in redo, and statement queue. You can use ApsaraDB RDS for MySQL with Database Autonomy Service (DAS) to implement self-perception, self-healing, self-optimization, self-O&M, and self-protection of databases. For more information, see What is DAS?

Factors that affect database performance

Database performance is affected by the following factors:

  • SQL query speed

  • Network settings

  • Disk I/O

  • Hardware specifications

  • Database engine version

  • Database parameter settings

Database performance optimization

  • Database configuration selection

    Before you start your workloads, we recommend that you check the configuration of your RDS instance. For more information, see the following topics:

  • DAS

    Database Autonomy Service (DAS) is a cloud service that implements self-perception, self-repair, self-optimization, self-O&M, and self-security of databases based on machine learning and expert experience. DAS makes database management simple and avoids service failures that are caused by manual operations. DAS enables a stable, secure, and efficient database service.

    You can use DAS to manage your RDS instance. For more information, see the following topics:

  • Configuration of database parameters

    You can use the high-performance parameter template provided by ApsaraDB RDS for MySQL. If you select this template, data is replicated in asynchronous mode. The high-performance parameter template delivers medium security but the fastest speed. For more information, see High-performance parameter template.

  • Monitoring and alerting

    ApsaraDB RDS provides a number of metrics that you can use to monitor the performance of your RDS instance. In addition, ApsaraDB RDS allows you to configure alert rules for these metrics. If the value of a metric meets the specified alert conditions, an alert is triggered. ApsaraDB RDS sends the alert to all the contacts in the associated alert group. For more information, see Monitoring and alerting.

  • Read/write splitting

    If your database system receives a large number of read requests and a small number of write requests, the primary RDS instance may fail to process read requests and your workloads may be interrupted. After read-only RDS instances are created, you can enable the read/write splitting feature. Then, you can use a dedicated proxy endpoint to perform read/write splitting. You need only to add the dedicated proxy endpoint to your application. After your application is connected to the dedicated proxy endpoint, ApsaraDB RDS routes write requests to the primary RDS instance and read requests to the read-only RDS instances based on the read weights of these instances. For more information, see Introduction to database proxies.

    image

    For more information about the read/write splitting feature, see Enable the proxy terminal feature for an ApsaraDB RDS for MySQL instance.

  • Caching

    If your RDS instance runs MySQL, use MySQL with Redis. This way, read requests are routed to the Redis cache instead of directly to your RDS instance. If the required data cannot be found in the Redis cache, the read requests are then routed to your RDS instance. This method increases query response speeds and relieves the pressure on your RDS instance.

Performance tests