AnalyticDB for MySQL provides workload management mechanisms that can be used to improve cluster performance and implement finer-grained cluster management.

Prerequisites

  • Your AnalyticDB for MySQL cluster is of the Data Warehouse Edition (V3.0).
  • The engine version of the cluster is V3.1.6.3 or later.
    Note For more information about how to view the minor engine version of a cluster, see How can I view the version of an AnalyticDB for MySQL cluster? To update the minor engine version of a cluster, contact technical support.

Background information

An OLAP database handles many types of workloads that each have different requirements on system resources. Some workloads involve simple queries that consume little resources and take a short time to execute, but they must be returned to requesters at a fast speed. Some workloads, on the contrary, involve complex queries that are both time-consuming and resource-demanding. Within the database, these different queries are executed by using the same set of CPU, memory, and disks. If the resources are not properly scheduled, the demanding workloads occupy a very large amount of resources and simple queries must wait for a long period of time to be executed. This degrades the overall performance of the database system.

This is what AnalyticDB for MySQL intends to address by providing workload management mechanisms.

Terms

  • Workload: Queries with common characteristics can be categorized as the same type of workload. The categorization can be based on requesters, priorities, or performance metrics.
  • Workload management: monitors and manages query workloads of databases to maximize resource utilization while maintaining system stability. Workload management is one of the core components of a data warehouse system.
  • Predicate: a condition expression that consists of a property, an operator, and a value. You can use one or multiple predicates to define a type of workload. For information about properties and operators, see the "Appendix 1: Properties" and "Appendix 2: Operators" sections of the WLM topic.
  • Action: operations that are performed on the queries that match the conditions, such as terminating or logging the queries. For more information about actions, see the "Appendix 3: Actions" section of the WLM topic.
  • Rule: A rule determines how the system manages a type of workloads. It consists of predicates and actions.

Rules for workload management

workload

AnalyticDB for MySQL manages workloads based on rules. A rule consists of conditions and actions. The conditions are specified in predicates. The queries that meet all the conditions of a rule are categorized into the same type of workload. The actions in a rule are performed only on the specific type of workload defined by the conditions of the rule.

You can use the rules to perform fine-grained management on workloads. For information about how to configure workload management rules, see Configure workload management rules .

References

Best practices for workload management