Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Administration - SQL Server 2014 » Latest topics
Viewing all articles
Browse latest Browse all 6525

Buffer memory usage

$
0
0
Hi,I have a SQL2014 server that I am noticing is using allot of system memory.When I run this memory usage query:[code="sql"]DECLARE @total_buffer INT;SELECT @total_buffer = cntr_value FROM sys.dm_os_performance_counters WHERE RTRIM([object_name]) LIKE '%Buffer Manager' AND counter_name = 'Total Pages';;WITH src AS( SELECT database_id, db_buffer_pages = COUNT_BIG(*) FROM sys.dm_os_buffer_descriptors --WHERE database_id BETWEEN 5 AND 32766 GROUP BY database_id)SELECT [db_name] = CASE [database_id] WHEN 32767 THEN 'Resource DB' ELSE DB_NAME([database_id]) END, db_buffer_pages, db_buffer_MB = db_buffer_pages / 128, db_buffer_percent = CONVERT(DECIMAL(6,3), db_buffer_pages * 100.0 / @total_buffer)FROM srcorder by db_buffer_MB desc[/code]Many of my instances are using 25gigs of my 64G of system memory. I have identified why this is happening (index on varchar). How do I clear out the buffer memory on a production server - without effecting users? Why doesn't SQL clear out the memory once it has completed? There are no other processes running - but it is still using much system memory.

Viewing all articles
Browse latest Browse all 6525

Trending Articles