Windows Server 2008 R2 – Troubleshooting Weird Memory Usage

memorymemory usageperformance-monitoringtask-managerwindows-server-2008

I hope someone can help. We've got a Windows Server 2008 R2 machine with 16GB of RAM that keeps getting all its available memory eaten by something. Nothing in Task Manager or Resource Monitor reveals any process using memory above 300MB… but memory usage on the server is 15.7GB.

https://i784.photobucket.com/albums/yy129/ThunderPeel2001/ram-usage.gif

The only things running are SQL Server 2008 and IIS7.5 (with ASP.Net).

Note: RAM usage after a reboot starts low and works its way up. After a week or so we keep finding outselves in this situation.

How can I discover what's eating all our memory? 🙁

Best Answer

Is this a 64bit server - do you have the lock pages in memory local policy enabled? SQL is likely consuming the rest of your memory If you look at the perfmon counters you will see the memory allocation

Here is an article that explains it in depth

You can also view the counters in SQL

SELECT
    object_name
   ,Counter_name
   ,cntr_value
   ,ROUND(( cntr_value * 8192.0 ) / 1048576, 0) AS cntr_value_MB
FROM
    sys.dm_os_performance_counters
WHERE
    object_Name LIKE '%Buffer Manager%'
    AND RTRIM(counter_name) IN ( 'Free pages', 'Total pages',
                                 'Database pages' ) 
UNION SELECT
    object_name
   ,Counter_name
   ,cntr_value
   ,ROUND(( cntr_value / 1024 ), 0) AS cntr_value_MB
FROM
    sys.dm_os_performance_counters
WHERE
    counter_name IN ( 'Target Server Memory (KB)',
                      'Total Server Memory (KB)' )