Workload management

更新时间:
复制 MD 格式

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

Prerequisites

Before you begin, ensure that:

  • Your AnalyticDB for MySQL cluster is running kernel version 3.1.6.3 or later

To check the kernel version, log on to the AnalyticDB for MySQL console and go to the Configuration Information section of the Cluster Information page. To upgrade, see Update the minor version of a cluster.

Background information

An online analytical processing (OLAP) database handles many types of workloads that each have different performance requirements. Some workloads involve simple queries that consume few resources and require a short period of 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: one of the core components of a data warehouse system. This component monitors and manages query workloads of databases to maximize resource utilization and ensure system stability.

  • Predicate: a condition expression that consists of a property, an operator, and a value. You can use one or more 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 workload. 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