快速入门:在 Azure 门户中使用工作负荷组配置 Synapse SQL 池工作负荷隔离Quickstart: Configure Synapse SQL pool workload isolation using a workload group in the Azure portal

在本快速入门中,你将通过创建用来预留资源的工作负荷组来配置工作负荷隔离In this quickstart, you will configure workload isolation by creating a workload group for reserving resources. 为实现本教程的目的,我们将创建用于加载数据的名为 DataLoads 的工作负荷组。For purposes of this tutorial, we will create the workload group for data loading called DataLoads. 此工作负荷组将预留 20% 的系统资源。The workload group will reserve 20% of the system resources. 如果与数据加载对应的隔离度为 20%,则可保证这些数据加载获得的资源能够满足 SLA 要求。With 20% isolation for data loads, they are guaranteed resources that allow them to hit SLAs. 创建工作负荷组后,可创建工作负荷分类器,将查询分配到此工作负荷组。After creating the workload group, create a workload classifier to assign queries to this workload group.

如果没有 Azure 订阅,请在开始前创建一个试用帐户If you don't have an Azure subscription, create a trial account before you begin.

登录到 Azure 门户Sign in to the Azure portal

登录 Azure 门户Sign in to the Azure portal.

备注

在 Azure Synapse Analytics 中创建 SQL 池实例可能会产生一个新的可计费服务。Creating a SQL pool instance in Azure Synapse Analytics may result in a new billable service. 有关详细信息,请参阅 Azure Synapse Analytics 定价For more information, see Azure Synapse Analytics pricing.

先决条件Prerequisites

本快速入门假定你在 Synapse SQL 中已有一个 SQL 池实例,并且你具有 CONTROL DATABASE 权限。This quickstart assumes you already have a SQL pool instance in Synapse SQL and that you have CONTROL DATABASE permissions. 如果需要创建一个 SQL 数据仓库,可使用创建并连接 - 门户创建名为“mySampleDataWarehouse”的数据仓库 。If you need to create one, use Create and Connect - portal to create a data warehouse called mySampleDataWarehouse.

重要

SQL 池必须联机才能配置工作负荷管理。Your SQL pool must be online to configure workload management.

配置工作负荷隔离Configure workload isolation

可以通过创建工作负荷组,为特定工作负荷隔离和保留 SQL 池资源。SQL pool resources can be isolated and reserved for specific workloads by creating workload groups. 请参阅工作负荷隔离概念文档,详细了解工作负荷组如何帮助你实现工作负荷管理。See the Workload Isolation concept documentation for more details on how workload groups help you achieve managing your workload. 创建并连接 - 门户快速入门创建了 mySampleDataWarehouse 并使用 400 DWU 对其进行了初始化。The Create and Connect - portal quickstart created mySampleDataWarehouse and initialized it with 400 DWUs. 以下步骤在 mySampleDataWarehouse 中创建一个工作负荷组。The following steps create a workload group in mySampleDataWarehouse.

若要创建隔离度为 20% 的工作负荷组,请执行以下操作:To create a workload group with 20% isolation:

  1. 在 Azure 门户的左侧页中单击“Azure Synapse Analytics (前称为 SQL 数据仓库)”。 Click Azure Synapse Analytics (formerly SQL DW) in the left page of the Azure portal.

  2. 从“Azure Synapse Analytics (以前称为 SQL DW)” 页中选择 mySampleDataWarehouseSelect mySampleDataWarehouse from the Azure Synapse Analytics (formerly SQL DW) page. 此时将打开 SQL 池。The SQL pool opens.

  3. 单击“工作负荷管理” 。Click Workload management.

  4. 单击“新建工作负荷组” 。Click New workload group.

  5. 单击“自定义” 。Click Custom.

    单击“自定义”

  6. 对于“工作负荷组”,输入 DataLoadsEnter DataLoads for the Workload group.

  7. 对于“最小资源百分比”,输入 20Enter 20 for Min. resources %.

  8. 对于“每个请求的最小资源百分比”,输入 5Enter 5 for Min. resources % per request.

  9. 对于“资源百分比上限”,输入 100Enter 100 for Cap resources %.

  10. 单击“ 保存”。Click Save.

点击“保存”

创建工作负荷组后会出现门户通知。A portal notification appears when the workload group is created. 工作负荷组资源显示在已配置值下方的图表中。The workload group resources are displayed in the charts below the configured values.

单击“最终”

清理资源Clean up resources

若要删除在本教程中创建的 DataLoads 工作负荷组,请执行以下步骤:To delete the DataLoads workload group created in this tutorial:

  1. 单击 DataLoads 工作负荷组右侧的 ...Click on the ... to the right of the DataLoads workload group.

  2. 单击“删除工作负荷组” 。Click on Delete workload group.

  3. 在系统提示你确认删除工作负荷组时,单击“是” 。Click on Yes when prompted to confirm deletion of the workload group.

  4. 单击“保存” 。Click on Save.

    单击“删除”

我们会针对数据仓库中存储的数据,按数据仓库单位收费。You're being charged for data warehouse units and data stored in your data warehouse. 这些计算和存储资源是分开计费的。These compute and storage resources are billed separately.

  • 如果想要将数据保留在存储中,可以在不使用数据仓库时暂停计算。If you want to keep the data in storage, you can pause compute when you aren't using the data warehouse. 如果暂停计算资源,则你只需支付数据存储费用。By pausing compute, you're only charged for data storage. 准备好处理数据时,可以恢复计算。When you're ready to work with the data, resume compute.
  • 如果不想支付将来的费用,则可以删除数据仓库。If you want to remove future charges, you can delete the data warehouse.

遵循以下步骤清理资源。Follow these steps to clean up resources.

  1. 登录到 Azure 门户,选择你的数据仓库。Sign in to the Azure portal, select on your data warehouse.

    清理资源

  2. 若要暂停计算,请选择“暂停” 按钮。To pause compute, select the Pause button. 暂停数据仓库后,可看到“启动” 按钮。When the data warehouse is paused, you see a Start button. 若要恢复计算,请选择“启动” 。To resume compute, select Start.

  3. 若要删除数据仓库以免产生计算或存储费用,请选择“删除” 。To remove the data warehouse so you're not charged for compute or storage, select Delete.

  4. 若要删除你创建的 SQL 服务器,请选择上图中的“sqlpoolservername.database.chinacloudapi.cn”,然后选择“删除”。 To remove the SQL server you created, select sqlpoolservername.database.chinacloudapi.cn in the previous image, and then select Delete. 请谨慎执行此删除操作,因为删除服务器的同时也会删除分配给该服务器的所有数据库。Be careful with this deletion, since deleting the server also deletes all databases assigned to the server.

  5. 若要删除资源组,请选择“myResourceGroup” ,然后选择“删除资源组” 。To remove the resource group, select myResourceGroup, and then select Delete resource group.

后续步骤Next steps

若要使用 DataLoads 工作负荷组,需要创建一个工作负荷分类器,以将请求路由到工作负荷组。To use the DataLoads workload group, a workload classifier needs to be created to route requests to the workload group. 继续学习创建工作负荷分类器教程,为 DataLoads 创建工作负荷分类器。Continue to the create workload classifier tutorial to create a workload classifier for DataLoads.

另请参阅See also

有关如何监视工作负荷以进行工作负荷管理的详细信息,请参阅操作方法文章:管理和监视工作负荷管理See the how-to article Manage and monitor Workload Management for details on how to monitor workloads for workload management.