Workload management overview
AnalyticDB for MySQL includes a built-in workload management module that improves overall cluster performance through fine-grained workload control and intelligent resource scheduling.
Prerequisites
Your AnalyticDB for MySQL cluster must run kernel version 3.1.6.3 or later.
To view and update the minor version, go to the Configuration Information section on the Cluster Information page in the AnalyticDB for MySQL console.
Background
OLAP databases typically handle a mix of workload types. Lightweight queries are simple, consume few resources, and complete quickly, but require fast response times. At the same time, complex analytical queries involve intensive computation, consume substantial resources, and run for extended periods. Each workload type has distinct performance requirements.
Within a database, concurrently running queries share system resources such as CPU, memory, and disk I/O. Resource-intensive analytical queries, such as Business Intelligence (BI) reports, can monopolize system resources. Without proper workload controls, other concurrent queries must wait for resources to become available, which degrades overall database performance.
To address these challenges, AnalyticDB for MySQL provides a workload management module that monitors and controls query workloads to improve cluster performance and enable fine-grained resource management.
Concepts
-
Workload: A group of database query requests that share common characteristics. You can classify queries into different workloads based on attributes such as query source, business priority, or performance objectives.
-
Workload Manager: A core database component that uses various techniques to monitor and manage query workloads. The Workload Manager ensures system stability while maximizing query performance and resource utilization.
-
Predicate: A condition that consists of a property, an operator, and a value. A predicate filters queries based on a specific attribute. You can combine multiple predicates to identify a group of queries that belong to the same workload. For more information about supported properties and operators, see Properties and Operators.
-
Action: A query-level control operation, such as terminating a query (KILL) or logging a query (LOG). Each action type represents a different way to handle a matching query. For more information, see Actions.
-
Rule: A rule consists of one or more predicates and one or more actions. The workload management module uses rules to manage workloads. Each rule defines how a specific type of workload is identified and controlled.
Workload management rules

The workload management module in AnalyticDB for MySQL is built on a straightforward rule-based framework. Each rule consists of two parts: a match condition part and an action part. The match condition part contains one or more predicates. Queries that satisfy all predicates are identified as the same type of workload. The action part contains one or more actions that define the control operations to apply to the matching workload.
You can create rules based on your requirements and use multiple rules to achieve fine-grained control over different workloads. For more information, see Configure workload management rules.