You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[!INCLUDE [sssql19-starting-md](../../includes/sssql19-starting-md.md)], this configuration setting is used for [accelerated database recovery](../../relational-databases/accelerated-database-recovery-concepts.md) (ADR). The cleaner is an asynchronous process that wakes up periodically and cleans page versions that aren't needed.
18
+
[!INCLUDE [sssql19-starting-md](../../includes/sssql19-starting-md.md)], this configuration setting is used for [accelerated database recovery](../../relational-databases/accelerated-database-recovery-concepts.md) (ADR). The cleaner is an asynchronous process that wakes up periodically and cleans row versions that aren't needed.
19
19
20
-
Occasionally the cleaner might run into issues while acquiring object level locks due to conflicts with user workloads during its sweep. The cleaner tracks such pages in a separate list. `ADR cleaner retry timeout (min)` controls the amount of time the cleaner spends exclusively retrying object lock acquisition and cleanup of pages before it abandons the sweep. Completing the sweep with 100% success is essential to keep the growth of aborted transactions in the aborted transactions map. If the pages on the separate list can't be cleaned up in the prescribed timeout, then the current sweep is abandoned, and the cleanup is attempted during the next sweep.
20
+
Occasionally the cleaner might run into issues while acquiring object or partition level `IX`locks due to lock conflicts with user workloads during its sweep. The cleaner tracks such pages in a separate list. `ADR cleaner retry timeout (min)` controls the amount of time the cleaner spends exclusively retrying `IX` lock acquisition and cleanup of pages before it abandons the sweep. Completing the sweep with 100% success is essential to keep the growth of aborted transactions in the aborted transactions map. If the pages on the separate list can't be cleaned up in the prescribed time-out, then the current sweep is abandoned, and the cleanup is attempted during the next sweep.
21
21
22
22
| Version | Default value |
23
23
| --- | --- |
@@ -28,7 +28,7 @@ Occasionally the cleaner might run into issues while acquiring object level lock
28
28
29
29
The cleaner is single threaded in [!INCLUDE [sssql19-md](../../includes/sssql19-md.md)]. In [!INCLUDE [sssql22-md](../../includes/sssql22-md.md)], the cleaner is single-threaded by default, but can be made multi-threaded by configuring the `ADR Cleaner Thread Count` server configuration.
30
30
31
-
If the cleaner is single-threaded, it can only work on one database at a time. If the instance has more than one database with ADR enabled, don't increase the timeout to a large value. Doing so could delay cleanup on one database while the retry is happening on another database.
31
+
If the cleaner is single-threaded, it can only work on one database at a time. If the instance has more than one database with ADR enabled, don't increase the time-out to a large value. Doing so could delay cleanup on one database while the retry is happening on another database.
description: "Explains the SQL Server instance configuration setting for ADR cleaner thread count."
4
4
author: MikeRayMSFT
5
5
ms.author: mikeray
6
-
ms.reviewer: randolphwest
7
-
ms.date: 12/04/2024
6
+
ms.reviewer: randolphwest, dfurman
7
+
ms.date: 02/03/2025
8
8
ms.service: sql
9
9
ms.subservice: configuration
10
10
ms.topic: conceptual
@@ -22,7 +22,7 @@ By default, this configuration setting is set to `1`. This means that the cleane
22
22
If the cleaner performance is insufficient and you observe that PVS size is reduced too slowly or remains large, you can increase this configuration to make the cleaner multi-threaded.
23
23
24
24
> [!IMPORTANT]
25
-
> PVS cleanup might be slow or blocked due to workload activity. Before increasing this configuration value, review [Troubleshoot accelerated database recovery](../../relational-databases/accelerated-database-recovery-troubleshoot.md). If PVS cleanup is slow or blocked for one of the reasons mentioned in that article, follow the recommendations in the article instead of increasing the `ADR Cleaner Thread Count` configuration value.
25
+
> PVS cleanup might be slow or blocked due to workload activity. Before increasing this configuration value, review [Monitor and troubleshoot accelerated database recovery](../../relational-databases/accelerated-database-recovery-troubleshoot.md). If PVS cleanup is slow or blocked for one of the reasons mentioned in that article, follow the recommendations in the article instead of increasing the `ADR Cleaner Thread Count` configuration value.
[!INCLUDE [sssql19-starting-md](../../includes/sssql19-starting-md.md)], this configuration setting is required for[accelerated database recovery](../../relational-databases/accelerated-database-recovery-concepts.md).
18
+
[!INCLUDE [sssql19-starting-md](../../includes/sssql19-starting-md.md)], this configuration setting is used by[accelerated database recovery](../../relational-databases/accelerated-database-recovery-concepts.md).
19
19
20
-
Accelerated database recovery (ADR) maintains versions of data for recovery purposes. These versions are generated as part of various data manipulation language (DML) operations. Versions are stored in an internal table called the persistent version store (PVS).
20
+
Accelerated database recovery (ADR) uses row versions for transaction management and database recovery purposes. These versions are generated as part of various data manipulation language (DML) operations. Versions are stored in an internal table called the persistent version store (PVS).
21
21
22
22
## Remarks
23
23
24
-
Performance can degrade if pages are allocated for persistent version store (PVS) as part of foreground user DML operations. A background thread preallocates pages, and keeps them readily available for DML transactions. Performance is optimal when the background thread preallocates enough pages that the percentage of foreground PVS allocations is close to 0. The error log contains entries with the tag `PreallocatePVS` if the percentage gets high enough to affect performance.
24
+
Performance can degrade if pages are allocated for persistent version store (PVS) as part of foreground user DML operations. A background thread preallocates pages, and keeps them readily available for DML transactions. Performance is optimal when the background thread preallocates enough pages that the percentage of foreground PVS allocations is close to 0. The error log contains entries with the tag `PreallocatePVS` if the percentage gets high enough to affect performance.
25
25
26
-
The number of pages the background thread preallocates is based on various workload heuristics, but largely allocates pages in chunks of 512 pages. The ADR preallocation factor is a multiple of the chunk. By default, the factor is `4`, which means that it preallocates 2048 pages at once when required.
26
+
The number of pages the background thread preallocates is based on various workload heuristics. Commonly, the background thread allocates chunks of 512 pages. The ADR preallocation factor is a multiple of the chunk. By default, the factor is `4`, which means that 2048 pages are preallocated at once when required.
27
27
28
28
While the background thread takes workload patterns into consideration, this factor can be increased if necessary to improve performance.
29
29
30
-
> [!CAUTION]
31
-
> If PVS preallocation factor is increased too much, it can contend with other allocations in the system and might actually reduce overall performance. Before you modify this setting, test the overall performance of the system.
30
+
> [!CAUTION]
31
+
> If PVS preallocation factor is increased too much, it can contend with other allocations in the system and might actually reduce overall performance. Before you modify this setting, obtain a baseline of the system performance for tracking and comparison purposes.
description: Find out how to manage and optimize SQL Server and Azure SQL Managed Instance resources. View available configuration options, possible settings, default values, and restart requirements.
5
5
author: rwestMSFT
6
6
ms.author: randolphwest
7
-
ms.reviewer: mikeray
8
-
ms.date: 09/12/2024
7
+
ms.reviewer: mikeray, dfurman
8
+
ms.date: 02/03/2025
9
9
ms.service: sql
10
10
ms.subservice: configuration
11
11
ms.topic: conceptual
@@ -34,27 +34,27 @@ keywords: server configuration (SQL Server)
34
34
35
35
You can manage and optimize [!INCLUDE [ssnoversion-md](../../includes/ssnoversion-md.md)] and [!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)] resources through configuration options by using [!INCLUDE [ssManStudioFull](../../includes/ssmanstudiofull-md.md)] or the `sp_configure` system stored procedure. The most commonly used server configuration options are available through [!INCLUDE [ssManStudioFull](../../includes/ssmanstudiofull-md.md)]; all configuration options are accessible through `sp_configure`. Consider the effects on your system carefully before setting these options. For more information, see [View or change server properties (SQL Server)](view-or-change-server-properties-sql-server.md).
36
36
37
-
> [!IMPORTANT]
38
-
> Advanced options should be changed only by an experienced database administrator or certified SQL Server technician.
37
+
> [!IMPORTANT]
38
+
> Advanced options should be changed only by an experienced database administrator.
39
39
40
40
## Categories of configuration options
41
41
42
-
If you don't see the effect of a configuration change, it might not be installed. Check to see that the `run_value` of the configuration option has changed.
42
+
Configuration option changes take effect only after issuing the `RECONFIGURE` (or in some cases, `RECONFIGURE WITH OVERRIDE`) statement. If you don't see the effect of a configuration change, check to see that the **run value** of the configuration option has changed.
43
43
44
-
Configuration options take effect immediately after setting the option and issuing the `RECONFIGURE` (or in some cases, `RECONFIGURE WITH OVERRIDE`) statement. Reconfiguring certain options invalidates plans in the plan cache, causing new plans to be compiled. For more information, see [DBCC FREEPROCCACHE](../../t-sql/database-console-commands/dbcc-freeproccache-transact-sql.md).
44
+
You can use the `sys.configurations` catalog view to determine the **config value** (the `value` column) and the **run value** (the `value_in_use` column), and whether the configuration option requires a [!INCLUDE [ssde-md](../../includes/ssde-md.md)] restart (the `is_dynamic` column).
45
45
46
-
You can use the `sys.configurations` catalog view to determine the `config_value` (the `value` column) and the `run_value` (the `value_in_use` column), and whether the configuration option requires a [!INCLUDE [ssde-md](../../includes/ssde-md.md)] restart (the `is_dynamic` column).
47
-
48
-
If SQL Server needs to restart, options show the changed value only in the `value` column. After restart, the new value will appear in both the `value` column and the `value_in_use` column.
46
+
If the [!INCLUDE [ssde-md](../../includes/ssde-md.md)] needs to restart, options show the changed value only in the `value` column. After restart, the new value appears in both the `value` column and the `value_in_use` column.
49
47
50
48
Some options require a server restart before the new configuration value takes effect. If you set the new value and run `sp_configure` before restarting the server, the new value appears in the `value` column of the `sys.configurations` catalog view, but not in the `value_in_use` column. When you restart the server, the new value appears in the `value_in_use` column.
51
49
52
-
> [!NOTE]
53
-
> The `config_value` in the result set of `sp_configure` is equivalent to the `value` column of the `sys.configurations` catalog view, and the `run_value` is equivalent to the `value_in_use` column.
50
+
> [!NOTE]
51
+
> The `config_value` column in the result set of `sp_configure` is equivalent to the `value` column of the `sys.configurations` catalog view, and the `run_value` is equivalent to the `value_in_use` column.
52
+
53
+
Reconfiguring certain options invalidates plans in the plan cache, causing new plans to be compiled. For more information, see [DBCC FREEPROCCACHE](../../t-sql/database-console-commands/dbcc-freeproccache-transact-sql.md).
54
54
55
55
Self-configuring options are options that SQL Server adjusts according to the needs of the system. In most cases, this eliminates the need for setting the values manually. Examples include the **max worker threads** option and the **user connections** option.
56
56
57
-
The following query can be used to determine if any configured values haven't been installed:
57
+
The following query can be used to determine if any configured values have been configured but aren't in effect:
58
58
59
59
```sql
60
60
SELECT*
@@ -72,10 +72,7 @@ There are two configuration options where the `value` and `value_in_use` might n
72
72
73
73
The `is_dynamic` column can be used to determine if the configuration option requires a restart. A value of `1` in the `is_dynamic` column means that, when the `RECONFIGURE` command is run, the new value takes effect immediately. In some cases, the [!INCLUDE [ssde-md](../../includes/ssde-md.md)] might not evaluate the new value immediately, but does so in the normal course of its execution. A value of `0` in the `is_dynamic` column means that the changed configuration value doesn't take effect until the [!INCLUDE [ssde-md](../../includes/ssde-md.md)] is restarted, even though the `RECONFIGURE` command was run.
74
74
75
-
For a configuration option that isn't dynamic there's no way to tell if the `RECONFIGURE` command has been run to apply the configuration change. Before you restart SQL Server to apply the configuration change, run the `RECONFIGURE` command to ensure all configuration changes will take effect when SQL Server next restarts.
76
-
77
-
> [!NOTE]
78
-
> [!INCLUDE[ssSQL14](../../includes/sssql14-md.md)] was the last version available on a 32-bit operating system.
75
+
For a configuration option that isn't dynamic there's no way to tell if the `RECONFIGURE` command has been run to apply the configuration change. Before you restart the [!INCLUDE [ssde-md](../../includes/ssde-md.md)] to apply the configuration change, run the `RECONFIGURE` command to ensure all configuration changes take effect when the [!INCLUDE [ssde-md](../../includes/ssde-md.md)] restarts.
79
76
80
77
## Configuration options
81
78
@@ -89,16 +86,16 @@ The following table lists all available configuration options, the range of poss
89
86
90
87
-**SC** = Self-configuring options.
91
88
92
-
> [!NOTE]
93
-
> [!INCLUDE [ssSQL14](../../includes/sssql14-md.md)] was the last version available on a 32-bit operating system.
89
+
> [!NOTE]
90
+
> [!INCLUDE [ssSQL14](../../includes/sssql14-md.md)] was the last version available on both a 32-bit and a 64-bit operating system. All later versions are available on 64-bit operating systems only.
0 commit comments