Skip to content

Commit 6120b72

Browse files
Add a best practice for dropping resource pools (#33783)
1 parent 7254ca3 commit 6120b72

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

docs/relational-databases/resource-governor/enable-resource-governor.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to enable resource governor using either SQL Server Manag
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: dfurman
7-
ms.date: 01/02/2025
7+
ms.date: 04/09/2025
88
ms.service: sql
99
ms.subservice: performance
1010
ms.topic: how-to
@@ -19,6 +19,8 @@ monikerRange: ">= sql-server-2016 || >= sql-server-linux-2017 || = azuresqldb-mi
1919

2020
Resource governor is turned off by default. You can enable resource governor using either [!INCLUDE[ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or [!INCLUDE[tsql](../../includes/tsql-md.md)].
2121

22+
For configuration and monitoring examples and to learn resource governor best practices, see [Tutorial: Resource governor configuration examples and best practices](resource-governor-walkthrough.md).
23+
2224
Enabling resource governor has the following results:
2325

2426
- The classifier function is executed for new connections so that workloads can be assigned to workload groups.

docs/relational-databases/resource-governor/resource-governor-walkthrough.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Use examples to learn how to create and validate resource governor
44
author: WilliamDAssafMSFT
55
ms.author: wiassaf
66
ms.reviewer: dfurman
7-
ms.date: 03/12/2025
7+
ms.date: 04/09/2025
88
ms.service: sql
99
ms.subservice: performance
1010
ms.topic: tutorial
@@ -506,6 +506,9 @@ GROUP BY wg.name,
506506
- Avoid using a frequently modified table in the classifier. That increases the risk of blocking that can delay logins and cause connection timeouts. The following workarounds can mitigate the risk, however they have downsides, including the risk of incorrect classification:
507507
- Consider using the `NOLOCK` table hint, or the equivalent `READUNCOMMITTED` hint. For more information, see [READUNCOMMITTED](../../t-sql/queries/hints-transact-sql-table.md#readuncommitted).
508508
- Consider using the `LOCK_TIMEOUT` setting at the start of the classifier function, setting it to a low value such as 1,000 milliseconds. For more information, see [SET LOCK_TIMEOUT](../../t-sql/statements/set-lock-timeout-transact-sql.md).
509+
- If you execute `ALTER RESOURCE GOVERNOR RECONFIGURE` after deleting an unused resource pool on a machine with a large amount of memory, the command might take a long time. If a classifier function is in effect before reconfiguration starts, new connection attempts made during that time might time out.
510+
511+
If you delete an unused resource pool, we recommend that you reconfigure resource governor during a maintenance window or a period of low activity.
509512
- You can't modify a classifier function while it is referenced in the resource governor configuration. However, you can modify the configuration to use a different classifier function. If you want to make changes to the classifier, consider creating a pair of classifier functions. For example, you might create `dbo.rg_classifier_A()` and `dbo.rg_classifier_B()`. When a change to the classifier logic is needed, follow these steps:
510513
1. Use the [ALTER FUNCTION](../../t-sql/statements/alter-function-transact-sql.md) statement to make the changes in the function *not* currently used in the resource governor configuration.
511514
1. Use the [ALTER RESOURCE GOVERNOR](../../t-sql/statements/alter-resource-governor-transact-sql.md) statement to make the modified classifier active, and then reconfigure resource governor. For example:

0 commit comments

Comments
 (0)