patternsqlMajor
Quick look at how much RAM is allocated to SQL Server?
Viewed 0 times
muchserversqllookquickhowramallocated
Problem
With SQL Server 2005, you could look at the Task Manager and, at least, get a cursory look at how much memory is allocated to SQL Server.
With SQL Server 2008, the Working Set or Commit Size never really goes above 500 MB, even though the SQLServer:Memory Manager/Total Server Memory (KB) perf counter states 16,732,760.
Is there a setting where it will actually show the server memory in the Task Manager? Or is it a result of them changing how memory is used in SQL Server
With SQL Server 2008, the Working Set or Commit Size never really goes above 500 MB, even though the SQLServer:Memory Manager/Total Server Memory (KB) perf counter states 16,732,760.
Is there a setting where it will actually show the server memory in the Task Manager? Or is it a result of them changing how memory is used in SQL Server
Solution
You could NEVER, EVER trust Task Manager to tell you how much memory SQL Server is using (maybe you are remembering a 32-bit system with a very small amount of memory). Stop using Task Manager for this, period. Use the performance counter - you can also query the performance counter using DMVs:
You could save that as a query shortcut in Tools > Options > Environment > Keyboard > Query Shortcuts, and get accurate results in a query window much faster than getting inaccurate results from Task Manager.
You can also check for memory pressure (and whether you can do anything about it) using these queries:
SELECT object_name, cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Total Server Memory (KB)';You could save that as a query shortcut in Tools > Options > Environment > Keyboard > Query Shortcuts, and get accurate results in a query window much faster than getting inaccurate results from Task Manager.
You can also check for memory pressure (and whether you can do anything about it) using these queries:
SELECT object_name, counter_name, cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name IN
('Total Server Memory (KB)', 'Target Server Memory (KB)');
-- SQL Server 2012:
SELECT physical_memory_kb FROM sys.dm_os_sys_info;
-- Prior versions:
SELECT physical_memory_in_bytes FROM sys.dm_os_sys_info;
EXEC sp_configure 'max server memory';Code Snippets
SELECT object_name, cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name = 'Total Server Memory (KB)';SELECT object_name, counter_name, cntr_value
FROM sys.dm_os_performance_counters
WHERE counter_name IN
('Total Server Memory (KB)', 'Target Server Memory (KB)');
-- SQL Server 2012:
SELECT physical_memory_kb FROM sys.dm_os_sys_info;
-- Prior versions:
SELECT physical_memory_in_bytes FROM sys.dm_os_sys_info;
EXEC sp_configure 'max server memory';Context
StackExchange Database Administrators Q#20973, answer score: 31
Revisions (0)
No revisions yet.