Missing Memory on Windows Server 2008

9,440

Solution 1

I found this article today which discusses in detail locked pages, AWE, and 64 bit systems. http://blogs.msdn.com/psssql/archive/2009/09/11/fun-with-locked-pages-awe-task-manager-and-the-working-set.aspx

One of the bullet points (#3) is title "Why is task manager not showing all of the memory allocated for SQL Server"

It's a very nice explanation. In the end the reason this doesn't show up is that sql server has "locked" those pages in memory. Locked pages are NOT part of the working set so they won't appear in Task manager or even appear as part of the applications memory set.

If you run select * from sys.dm_os_process_memory you can see the locked_page_allocations_kb field which will tell you how much RAM sql server has allocated in those pages.

Solution 2

Task Manager has a memory bar/graph below the CPU bar/graph. This is the amount used by applications.

The sum of the amount indicated by that graph and the amount indicated as "Available" should equal your 8GB total.

"Available" is more than "Free" because "Cached" is included in "Available".

Solution 3

I'm having a similar issue. Came across this technet article - 907877. Try using the SQL command DBCC MEMORYSTATUS and check if AWE allocated entry equals your missing memory.

Share:
9,440

Related videos on Youtube

user355002
Author by

user355002

Updated on September 17, 2022

Comments

  • user355002
    user355002 over 1 year

    I have a windows 2008 x64 server with 8GB of RAM installed.

    Task Manager and Resource Monitor both insist that 7.5GB of the RAM is in use. However, the memory list under Processes (Memory Private Bytes) doesn't add up. I do have Show Processes from all users checked and hand adding the numbers I come up with about 3.5GB of RAM.

    I also looked at the latest copy of SysInternals Process Explorer. And neither the Private Bytes or Working Set adds up to more than about 3.5GB of RAM in use.

    What's going on?

    =====

    Update: I bounced the server to see what would happen with the memory utilization. After boot and regular operations began it sat at 3GB of RAM usage. 18 hours later, it's back up to 6.8GB of usage with no indication as to where the additional 3.5GB or so of RAM is being used.

    Here are links to screen shots of the resource monitor and task manager:

    Resource Monitor

    Task Manager

    Update 2: Well, I believe I located the problem. When I detached one of the larger databases from my sql server the amount of ram shown as "in use" dropped drastically. The Memory Private Bytes count barely moved. So I'm guessing that SQL server has some way of allocating memory where it doesn't really show up in any of the monitors.

    I went further and created a new database file, then transferred all of the data from the one I detached. Even though it has the same data, and the same transactions going through it, the memory in use has stayed low. Maybe there was some corruption in the DB? I'll leave it to the DB gods and go searching for another "problem" ;)

  • aeroshock
    aeroshock over 14 years
    3.5gb shared to a video card... on a server? Unlikely.
  • user355002
    user355002 over 14 years
    Its a headless dell server...
  • user355002
    user355002 over 14 years
    Yes.. The problem is that adding up all of the memory that the applications are using does not equal even half of the RAM in use. I'm trying to figure out what this hidden thing is which has swallowed several GB of ram.
  • user355002
    user355002 over 14 years
    I should also mention that bouncing the machine returns everything back to normal. But that isn't a good solution, I need to know where it's going off to.
  • JamesR
    JamesR over 14 years
    Yes I think Graeme is saying that your disk cache is using the rest. Don't worry. It will give it back if needed.
  • user355002
    user355002 over 14 years
    Possible. How could I figure out which app is the culprit? The list includes SQL 2005 SP3, Sharepoint 2007, and a c# web service running under IIS. I don't think it's the web service, because it is running on other machines with zero memory issues.
  • ThatGraemeGuy
    ThatGraemeGuy over 14 years
    can you post a screenshot of Task Manager's performance tab?
  • Erik Nijland
    Erik Nijland over 14 years
    support.microsoft.com/kb/907877 does mention "Note Performance Monitor (PerfMon) and Task Manager do not account for memory correctly if Address Windowing Extentions (AWE) support is enabled."
  • user355002
    user355002 over 14 years
    Its an x64 server, so AWE doesn't apply. It's a noop in 64 bit.