This is a really useful feature which is used to extend your buffer memory on the disk if the RAM of the server is could not be extended and SQL Server is deficient of memory resources.
Query to enable BPE, Specify the file location which will be used to store the buffer data on disk.
USE master
GO
ALTER SERVER CONFIGURATION
SET BUFFER POOL EXTENSION ON
(FILENAME = 'N:\adhoc\SQL2016.BPE', SIZE = 10 GB);
GO
We can also query the pages the buffer pool extension file with the below query.
SELECT COUNT(*) AS cached_pages_count
FROM sys.dm_os_buffer_descriptors
WHERE is_in_bpool_extension <> 0
Query to disable BPE, this will automatically delete the file.
ALTER SERVER CONFIGURATION
SET BUFFER POOL EXTENSION OFF;
GO
Note:
We can increase the buffer pool extension file size online but if you are planning to decrease the size we need to restart the SQL services
According to Books Online you can set the Buffer Pool Extension size up to 32 times the size of RAM
No comments:
Post a Comment