patternsqlMinor
Inconsistent information from different DMVs
Viewed 0 times
inconsistentdifferentdmvsfrominformation
Problem
I've a server with 12 GB of physical RAM. I just lowered its
If I look at the processes' committed memory in Perfmon, I see:
Target Server Memory (KB): 8388608
Total Server Memory (KB): 8388608
Showing that SQL Server has already relased the additional 2 GB of memory from the Buffer Pool.
However, if I look at the
I get inconsistent results:
bpool_committed = 1048576
bpool_commit_target = 1048576
bpool_visible = 1048576
Shouldn't
I'm running Microsoft SQL Server 2005 SP1 on Windows Server 2003.
'Max Server Memory (MB)' setting from 10 GB to 8 GB.If I look at the processes' committed memory in Perfmon, I see:
select *
from sys.dm_os_performance_counters
where [object_name] like 'SQLServer:Memory Manager%';
goTarget Server Memory (KB): 8388608
Total Server Memory (KB): 8388608
Showing that SQL Server has already relased the additional 2 GB of memory from the Buffer Pool.
However, if I look at the
sys.dm_os_sys_info:select [bpool_committed]
, [bpool_commit_target]
, [bpool_visible]
from sys.dm_os_sys_info;
goI get inconsistent results:
bpool_committed = 1048576
bpool_commit_target = 1048576
bpool_visible = 1048576
Shouldn't
sys.dm_os_sys_info reflect the information on the performance counters?I'm running Microsoft SQL Server 2005 SP1 on Windows Server 2003.
Solution
There is no inconsistency:
1048576 * 8 = 8388608 KB => 8 GB;
Both Perfmon and
If you want to use a multiplication within the query try:
1048576 * 8 = 8388608 KB => 8 GB;
Both Perfmon and
sys.dm_os_sys_info show 8 GB;[bpool_visible], [bpool_commit_target] and [bpool_committed] - in SQL 2005 all these are defined as "Number of 8-KB buffers ..." (http://msdn.microsoft.com/en-us/library/ms175048(v=sql.90).aspx), so you have to multiply the result by 8 to get KB; Starting with SQL 2008 R2 you no longer have to do the multiplication.If you want to use a multiplication within the query try:
SELECT CAST((bpool_committed * 8) / (1024.0 * 1024.0) AS DECIMAL(20, 2)) AS buffer_pool_committed_memory_in_GB
, CAST((bpool_commit_target * 8) / (1024.0 * 1024.0) AS DECIMAL(20, 2)) AS buffer_pool_target_memory_in_GB
, CAST((bpool_visible * 8) / (1024.0 * 1024.0) AS DECIMAL(20, 2)) AS buffer_pool_visible_memory_in_GB
FROM sys.dm_os_sys_info;Code Snippets
SELECT CAST((bpool_committed * 8) / (1024.0 * 1024.0) AS DECIMAL(20, 2)) AS buffer_pool_committed_memory_in_GB
, CAST((bpool_commit_target * 8) / (1024.0 * 1024.0) AS DECIMAL(20, 2)) AS buffer_pool_target_memory_in_GB
, CAST((bpool_visible * 8) / (1024.0 * 1024.0) AS DECIMAL(20, 2)) AS buffer_pool_visible_memory_in_GB
FROM sys.dm_os_sys_info;Context
StackExchange Database Administrators Q#18222, answer score: 3
Revisions (0)
No revisions yet.