Solved

Server uses up all memory

Posted on 2011-02-15
16
645 Views
Last Modified: 2012-05-11
Hello,

I have an issue with a Windows Server 2008 32bit server running SQL Server 2008. The server is a VM and has 4G of memory. The memory usage of the SQL server is limited to 2048MB. However when I check the task manager this morning then 3.92 G of the server are being used. The sql server service is using about 1.7G but there is nothing else being displayed what is using the memory. I also checked the with process explorer and the only process using lots of  memory is sql server.

How can I figure out what is using and not releasing the other 2G of memory?

Thank you
Mc2102
0
Comment
Question by:Mc2102
  • 8
  • 7
16 Comments
 
LVL 33

Expert Comment

by:paulmacd
Comment Utility
The OS itself is probably using the rest.  This would be by design.  What's the point of having 4GB of RAM if you're not going to use it?
0
 

Author Comment

by:Mc2102
Comment Utility
The problem I se here is that I do not know what the OS is using the memory for. The other problem is that if there is not memory left that I would assume the OS and apps are battleling over the memory. In my world a cpu usage of 95% is a concern.
0
 

Author Comment

by:Mc2102
Comment Utility
The other concern I have is the fact that I limit the sal server to use only 2G of RAM - so what is the OS using 2G of RAM for? Is there a memory leak? Which app is it? Why is it not being displayed in task manager? As I said: That is concerning to me.
0
 
LVL 33

Accepted Solution

by:
paulmacd earned 500 total points
Comment Utility
An average CPU usage of 95% means your resources are being approprately used.  Ditto the memory.  I wouldn't worry unless CPU usage pegs out at 100% for long periods of time, or you notice a great deal of swap file (paged memory) usage.

On my Windows 2008 server, the Processes tab of the Task Manager lists all the running processes and the memory each one is using.  I'm not doing the math, but I expect the numbers add up.
0
 
LVL 10

Expert Comment

by:LMiller7
Comment Utility
It would be useful if you could post a screenshot of Task Manager - performance tab. This would answer some important questions avoid much speculation.
0
 

Author Comment

by:Mc2102
Comment Utility
I attached the screenshot of the 'performance' tab in the task manager. There is a good possibility that the server is simply overloaded and that this is what the problem here is. The thing what I am not able to explain so is the fact that the SQL server is limited to 2048 MB of memory usage and stll the server uses up almost all memory. But for what is it using the other 2G? I counted up all processes being run in the 'processes' tab and the server should use about 2.5 G and not all of.

I also attached a screenshot of the 'processes' tab in the task manager
task-manager---processes-tab.jpg
task-manager---performance-tab.jpg
0
 
LVL 33

Assisted Solution

by:paulmacd
paulmacd earned 500 total points
Comment Utility
Well you can see there in the Task Manager dialog that SQL Server is using roughly 1.5GB of RAM.  It's likely the other 60 processes are using the rest.  It is troubling that there is no free memory at all - does it stay that way or was this screen capture taken during a spike?  

SQL Server doesn't just consume memory for itself, but for indexes, etc, loading them in memory for fast access.  That's why I'm not surprised it's using as much as possible.  With SQL Server more memory is almost always better.

Is this a particularly busy server?  Does it have many (or large) databases on it?  Can you allocate more memory to the virtual machine?
0
 

Author Comment

by:Mc2102
Comment Utility
The server is very busy. There is already a plan on the table to replace this 32Bit machine with a 64bit machine and move some or maybe all apps off.
I counted up the memory of th other tasks but they use up arround 256 MB not 2.0G. The memory usage varies a little. I have checked a couple times and the memory usage went down to 2.7G bu never lower. We could easily allocate more memory to the VM but I am worried that if I even double the memory of the server that it will use up all this memory as well.

So you do not think there is a issue like a memory leak or something? or an app which is acting up?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 33

Expert Comment

by:paulmacd
Comment Utility
I don't suspect a memory leak at all - especially if the memory consumption goes down occassionally.  I expect SQL Server is doing what it does best and using all the resources at its disposal to run as well as possible.
0
 

Author Comment

by:Mc2102
Comment Utility
Ok i believe ur judegment but then let me ask you why does the memory usage of the SQL server is not being reflected in the task manager. How can I determine what exactly is using up the other 2G because as I mentioned before the memory usage of the processes in the 'processes' tab use about 2.25 GB not 3.95G.
0
 
LVL 33

Expert Comment

by:paulmacd
Comment Utility
Well, 2GB of processes + 2GB memory allocated to SQL for its use = 4GB, right?
0
 

Author Comment

by:Mc2102
Comment Utility
Yes the VM has 4G but again if I count the memory usage of all the processes in the processes tab in the task manager togehter then I get a total of 2.25G not 4G.
0
 
LVL 33

Expert Comment

by:paulmacd
Comment Utility
Yes, the applications are taking up about 2GB of RAM.  SQL Server is using the rest of it (because you've told it it can use up to 2GB) for caching tables, indexes, etc.  Total of 4GB-ish.
0
 

Author Comment

by:Mc2102
Comment Utility
The 2.25G I was talking about include the SQL server service. 2G for SQl server and 256 MB for the apps. That is what the task manager displays.
0
 
LVL 33

Expert Comment

by:paulmacd
Comment Utility
Okay, maybe I'm wrong.  You can test it by configuring SQL Server to use less than 2048MB and see if that changes the system's memory usage.  My contention is that the 2048MB setting is in addition to the 1.645MB you see in the Task Manager.
0
 

Author Comment

by:Mc2102
Comment Utility
We simply decided to build another machine with SQL Server 2008 64bit with more memory and more CPU resources and check if we can battle the problem this way.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

You might have come across a situation when you have Exchange 2013 server in two different sites (Production and DR). After adding the Database copy in ECP console it displays Database copy status unknown for the DR exchange server. Issue is strange…
New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
This tutorial will show how to push an installation of Backup Exec to an additional server in both 2012 and 2014 versions of the software. Click on the Backup Exec button in the upper left corner. From here, select Installation and Licensing, then I…
This tutorial will show how to configure a new Backup Exec 2012 server and move an existing database to that server with the use of the BEUtility. Install Backup Exec 2012 on the new server and apply all of the latest hotfixes and service packs. The…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now