什么是工作负荷管理?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 中的 Synapse SQL,要通过资源类管理查询性能。In the past, for Synapse SQL 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,则允许该用户使用系统上 100% 的内存。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 action 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