Hi Guys,
Help is greatly appreciated on this one. I'm seeing a large gap between the working set bpool and memory clerks. Could be normal but I can't find any details on it.
Just recently installed a 64bit 2008 R2 Server with 256GB of RAM.
Scenario: SQL Service is LPIM with the largest db at 160GB pulling in large tables into the bpool.
I can see from the queries below that the buffer pool is somewhere around 160-166GB butdm_os_buffer_descriptorsis only showing 121GB total used.
What I'm trying to find is what is the large 45GB gap in the buffer pool and how can I view more details information on it?
selecttype, name,sum(awe_allocated_kb)/1024asawe_allocated_mb
fromsys.dm_os_memory_clerks
whereawe_allocated_kb> 0
groupbytype,name
orderbyawe_allocated_mbdesc
go
type name awe_allocated_mb
----------------------------------------------------------------------------------------------------
MEMORYCLERK_SQLBUFFERPOOL Default167887
MEMORYCLERK_SQLSTORENG Default6
SELECT CAST(physical_memory_in_use_kb
/(1024.0* 1024.0) ASDECIMAL(20, 2))ASMemoryUsedBySqlServerGB
FROM sys.dm_os_process_memory;
MemoryUsedBySqlServerGB
--------------------------------------------------
166.00
-- total pages
SELECT*FROM sys.dm_os_performance_counters
WHEREcounter_name= 'total pages'AND object_name='SQLServer:Buffer Manager'
object_name counter_name instance_name cntr_value
----------------------------------------------------------------------------------------------------
SQLServer:Buffer Manager Total pages 20826383
-- Total/Target Server Memory
SELECTCAST(cntr_value/1024.0/1024.0 ASDECIMAL(18,2))AScntr_value_GB,counter_nameFROMsys.dm_os_performance_counters
WHEREcounter_nameLIKE'%Total Server Memory%'UNION
SELECTCAST(cntr_value/1024.0/1024.0 ASDECIMAL(18,2))AScntr_value_GB,counter_nameFROMsys.dm_os_performance_counters
WHEREcounter_nameLIKE'%Target Server Memory%'
cntr_value_GB counter_name
--------------------------------------------------
158.89 Total Server Memory (KB)
211.06 Target Server Memory (KB)
-- buffer descriptors
SELECT(COUNT(*)* 8 / 1024 /1024)AS [GBUsed]
FROMsys.dm_os_buffer_descriptors
GBUsed
--------------------------------------------------
121
SELECT
(CASEWHEN ([database_id]= 32767)
THENN'Resource Database'
ELSEDB_NAME([database_id])END) AS[DatabaseName],
COUNT(*)* 8 / 1024 AS[MBUsed],
SUM(CAST([free_space_in_bytes]ASBIGINT))/(1024* 1024) AS[MBEmpty]
FROMsys.dm_os_buffer_descriptors
GROUPBY[database_id];
GO
DatabaseName MBUsed MBEmpty
----------------------------------------------------------------------------------------------------
ReportServerTempDB 1 0
ReportServer 1 0
DB1 1437 725
tempdb 930 46
model 1 0
master 2 1
DB2 3511 11
DB3 5984 13
DB4 112462 19178
Resource Database 29 8
msdb 10 5
SELECT(SUM(single_pages_kb)+SUM(multi_pages_kb))/1024
ascache_size_mbFROMsys.dm_os_memory_cache_counters
cache_size_mb
--------------------------------------------------
1078
Many thanks!