Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

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? :(

share|improve this question
How exactly did you " Having now limited SQL Server RAM usage (min/max) to 13GB, this shouldn't happen again."? I'm running a Win 2008 R2 machine with SQL 2008 R2 and I'm running into the same issue. – user72232 Feb 25 '11 at 20:36
It's a setting within SQL Server Studio. Good luck! – Django Reinhardt Feb 26 '11 at 19:32
@user72232: – Tim Schmelter Feb 20 '12 at 15:04
up vote 12 down vote accepted

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

   ,ROUND(( cntr_value * 8192.0 ) / 1048576, 0) AS cntr_value_MB
    object_Name LIKE '%Buffer Manager%'
    AND RTRIM(counter_name) IN ( 'Free pages', 'Total pages',
                                 'Database pages' ) 
   ,ROUND(( cntr_value / 1024 ), 0) AS cntr_value_MB
    counter_name IN ( 'Target Server Memory (KB)',
                      'Total Server Memory (KB)' )
share|improve this answer
This explains everything. Memory usage was "use all available" (ie. 2000TB) and with the pages being locked in RAM, then not everything had access to it when it was in use. Having now limited SQL Server RAM usage (min/max) to 13GB, this shouldn't happen again. I now have several tools available to keep watch on any changes, too. Thanks for your help! – Django Reinhardt Feb 24 '10 at 11:53
>> I now have several tools available to keep watch on any changes, too -- Which tools did you use? – David Christiansen May 9 '11 at 8:08

Quick test: restart SQL Server.
Another quick test: restart IIS.

You'll know for sure if one of them is the culprit, or if you have to look somewhere else.

share|improve this answer
Looks like SQL WAS the culprit! – Django Reinhardt Feb 24 '10 at 11:43

It may help to use RamMap to see where your memory goes to.

share|improve this answer

Are you actually experiencing any memory-related problem?

Does memory usage ever become higher than the actual installed memory, or does it just fill up and stay there?

If memory just fills up but you're not experiencing any problem, then it's just cache doing its job; memory will be automatically realeased if and when you'll actually need it.

If memory usage goes above the physical limit and the server grinds to a halt, then you're experiencing some memory leak and should definitely debug it.

Some interesting articles on the "cache" topic:

share|improve this answer
Well we couldn't install any Critical Windows updates without reseting the server because it kept running out of RAM. Pretty ridiculous. Whatever was using it, didn't want to give it back. – Django Reinhardt Feb 23 '10 at 20:51

have you inspected Perfmon (specifically the SQL counters), as suggested by someone in your other thread?

share|improve this answer
Yep, but "inspecting Perfmon" is more complicated than it sounds. – Django Reinhardt Feb 23 '10 at 20:49

First thing is to, as has been said before, patch it up and see if that resolves the issue.

Secondly, if that didn't work, use Process Explorer to get a better look at your memory usage. Go to the View menu, then Select Columns, Process Memory and check the Private Bytes, Virtual Size and Working Set Size options. See if that indicates what's to blame here.

A drastic approach would then be to try stopping services. IIS for example can be a total memory pig if you have app pools and web gardens misconfigured (too many of them) so that's a candidate.

Good luck!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.