DBA Sensation

October 1, 2008

ms sql 2005 memory usage investigation

Filed under: 3. MS SQL Server — zhefeng @ 2:08 pm

one of the production sql2005 is consuming large memory. Try to investigate which process is eating that much amount.

Physical memory (12G), 32bit cpu, awe enabled

–see the physical memory allocation
(Physical_memory_in_bytes/1024.0)/1024.0 AS Physical_memory_in_Mb
FROM sys.dm_os_sys_info

–how much memory SQL Server has allocated through AWE.
SUM(awe_allocated_kb) / 1024 as [AWE allocated, Mb]
FROM sys.dm_os_memory_clerks

–get the memory consumption by internal components of SQL Server 2005
SELECT TOP 10 type,
SUM(single_pages_kb) as [SPA Mem, Kb]
FROM sys.dm_os_memory_clerks
ORDER BY SUM(single_pages_kb) DESC

Finally, using “dbcc memorystatus” can get the snapshot for the system memory allocation, ms ‘s kb artiacle:


Create a free website or blog at WordPress.com.