Skip to content

Commit 8a4ee1a

Browse files
author
Simonx Xu
committed
Update buffer-pool-scan-runs-slowly-large-memory-machines.md
1 parent ed7c274 commit 8a4ee1a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

support/sql/database-engine/performance/buffer-pool-scan-runs-slowly-large-memory-machines.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Here are some operations that may trigger a buffer pool scan to occur:
3636

3737
Starting with [SQL Server 2016 SP3](https://support.microsoft.com/help/5003279), [SQL Server 2017 CU23](https://prod.support.services.microsoft.com/topic/kb5000685-cumulative-update-23-for-sql-server-2017-22b653c7-8487-4564-9db2-b5c1bd465145?preview=true#bkmk_13741858) and [SQL Server 2019 CU9](https://support.microsoft.com/topic/kb5000642-cumulative-update-9-for-sql-server-2019-97ad5c3e-e002-4b6d-b566-698bf70ca44a#bkmk_13744390), an error message was added to the SQL Server [Error log](/sql/tools/configuration-manager/viewing-the-sql-server-error-log) to indicate that a buffer pool scan took a long time (10 seconds or longer):
3838

39-
>Buffer Pool scan took 14 seconds: database ID 7, command 'BACKUP DATABASE', operation 'FlushCache', scanned buffers 115, total iterated buffers 204640239, wait time 0 ms. See 'https://go.microsoft.com/fwlink/?linkid=2132602' for more information.
39+
> Buffer Pool scan took 14 seconds: database ID 7, command 'BACKUP DATABASE', operation 'FlushCache', scanned buffers 115, total iterated buffers 204640239, wait time 0 ms. See 'https://go.microsoft.com/fwlink/?linkid=2132602' for more information.
4040
4141
### Extended Event to diagnose a long scan
4242

@@ -49,11 +49,11 @@ If a scan takes more than 1 second, the XEvent will be recorded as follows when
4949
|buffer_pool_scan_complete|7|1308|BACKUP DATABASE|FlushCache|243|19932814|
5050

5151
> [!NOTE]
52-
> The threshold is in the XEvent is smaller to allow you to capture information at a finer-granularity.
52+
> The threshold in the XEvent is smaller to allow you to capture information at a finer-granularity.
5353
5454
## Workaround
5555

56-
Prior to SQL Server 2022, there was no way to eliminate this problem. It is not recommended to perform any action to clear the buffer pool as dropping clean buffers ([DBCC DROPCLEANBUFFERS](/sql/t-sql/database-console-commands/dbcc-dropcleanbuffers-transact-sql)) from the buffer pool may result in a significant performance degradation. Removing database pages from memory will cause subsequent query executions to re-read the data from the database files on disk. This process of accessing data via disk I/O causes queries to be slow.
56+
Prior to SQL Server 2022, there was no way to eliminate this problem. It isn't recommended to perform any action to clear the buffer pool as dropping clean buffers ([DBCC DROPCLEANBUFFERS](/sql/t-sql/database-console-commands/dbcc-dropcleanbuffers-transact-sql)) from the buffer pool may result in a significant performance degradation. Removing database pages from memory will cause subsequent query executions to re-read the data from the database files on disk. This process of accessing data via disk I/O causes queries to be slow.
5757

5858
In SQL Server 2022, this problem is mitigated because buffer pool scans are parallelized by utilizing multiple cores. There will be one task per 8 million buffers (64 GB) where a serial scan will still be used if there are less than 8 million buffers. For more information, watch [Buffer Pool Parallel Scan](/shows/data-exposed/sql-server-2022-introducing-buffer-pool-parallel-scan).
5959

0 commit comments

Comments
 (0)