什么是工作负荷管理?What is workload management?

运行混合工作负荷可能会在繁忙的系统上造成资源压力。Running mixed workloads can pose resource challenges on busy systems. 解决方案架构师寻求隔离经典数据仓库活动(例如加载、转换和查询数据)的方法,以确保有足够的资源来满足 SLA。Solution Architects seek ways to separate classic data warehousing activities (such as loading, transforming and querying data) to ensure that enough resources exist to hit SLAs.

物理服务器隔离可能会导致基础设施的容量利用不足、过度预留,或者进入一种随着硬件启动和停止而不断装填缓存的状态。Physical server isolation can lead to pockets of infrastructure that are underutilized, overbooked or in a state where caches are constantly being primed with hardware starting and stopping. 成功的工作负荷管理方案能够有效地管理资源,确保高效的资源利用,并将投资回报率 (ROI) 最大化。A successful workload management scheme effectively manages resources, ensures highly efficient resource utilization, and maximizes return on investment (ROI).

数据仓库工作负荷是指发生的与数据仓库相关的所有操作。A data warehouse workload refers to all operations that transpire in relation to a data warehouse. 这些组件的深度与广度取决于数据仓库的成熟度。The depth and breadth of these components depend on the maturity level of the data warehouse. 数据仓库工作负荷包括:The data warehouse workload encompasses:

  • 将数据载入仓库的整个过程The entire process of loading data into the warehouse
  • 执行数据仓库分析和报告Performing data warehouse analysis and reporting
  • 管理数据仓库中的数据Managing data in the data warehouse
  • 从管理数据仓库导出数据Exporting data from the data warehouse

数据仓库的性能容量由数据仓库单位决定。The performance capacity of a data warehouse is determined by the data warehouse units.

工作负荷管理的概念Workload management concepts

过去,对于 Azure Synapse 中的 SQL Analytics,你通过资源类管理查询性能。In the past, for SQL Analytics in Azure Synapse you managed the query performance through resource classes. 使用资源类可以根据角色成员身份将内存分配给查询。Resource classes allowed for assigning memory to a query based on role membership. 使用资源类的主要难题在于,一旦配置,就会缺少监管,或者无法控制工作负荷。The primary challenge with resources classes is that, once configured, there was no governance or ability to control the workload.

例如,如果将一个临时用户角色成员身份授予 smallrc,则允许该用户使用系统上的所有内存。For example, granting an ad-hoc user role membership to smallrc allowed that user to consume 100% of the memory on the system. 使用资源类时无法预留资源,也无法确保关键工作负荷有可用的资源。With resource classes, there is no way to reserve and ensure resources are available for critical workloads.

Azure Synapse 中的 Synapse SQL 池工作负荷管理包括三大概念:工作负荷分类工作负荷重要性工作负荷隔离Synapse SQL pool workload management in Azure Synapse consists of three high-level concepts: Workload Classification, Workload Importance and Workload Isolation. 这些功能可让你更好地控制工作负荷如何利用系统资源。These capabilities give you more control over how your workload utilizes system resources.

工作负荷分类的概念是指将请求分配到工作负荷组并设置重要性级别。Workload classification is the concept of assigning a request to a workload group and setting importance levels. 过去,这种分配是使用 sp_addrolemember 通过角色成员身份实现的。Historically, this assignment was done via role membership using sp_addrolemember. 现在可以通过创建工作负荷分类器来实现。This can now be done via the CREATE WORKLOAD CLASSIFER. 分类功能提供更丰富的一组选项(例如标签、会话和时间)来对请求进行分类。The classification capability provides a richer set of options such as label, session, and time to classify requests.

工作负荷重要性影响请求获取资源访问权限的顺序。Workload importance influences the order in which a request gets access to resources. 在繁忙的系统上,重要性较高的请求可以先访问资源。On a busy system, a request with higher importance has first access to resources. 重要性还可确保按顺序访问锁。Importance can also ensure ordered access to locks.

工作负荷隔离为工作负荷组预留资源。Workload isolation reserves resources for a workload group. 工作负荷组中预留的资源专供该工作负荷组使用,以确保能够执行它。Resources reserved in a workload group are held exclusively for that workload group to ensure execution. 工作负荷组还允许定义分配给每个请求的资源量,这与资源类的功能非常类似。Workload groups also allow you to define the amount of resources that are assigned per request, much like resource classes do. 使用工作负荷组可以预留一组请求可以消耗的资源量,或者限制其资源量。Workload groups give you the ability to reserve or cap the amount of resources a set of requests can consume. 最后,工作负荷组是对请求应用规则(例如查询超时)的机制。Finally, workload groups are a mechanism to apply rules, such as query timeout, to requests.

后续步骤Next steps