Solved

Server uses up all memory

Posted on 2011-02-15
16
647 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 34

Expert Comment

by:Paul MacDonald
ID: 34896782
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
ID: 34896875
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
ID: 34896894
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
Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 500 total points
ID: 34897044
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
ID: 34902008
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
ID: 34907357
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 34

Assisted Solution

by:Paul MacDonald
Paul MacDonald earned 500 total points
ID: 34907579
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
ID: 34907646
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
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 34907665
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
ID: 34907773
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 34

Expert Comment

by:Paul MacDonald
ID: 34907851
Well, 2GB of processes + 2GB memory allocated to SQL for its use = 4GB, right?
0
 

Author Comment

by:Mc2102
ID: 34907870
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 34

Expert Comment

by:Paul MacDonald
ID: 34907889
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
ID: 34907903
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 34

Expert Comment

by:Paul MacDonald
ID: 34907961
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
ID: 34983810
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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This tutorial will give a an overview on how to deploy remote agents in Backup Exec 2012 to new servers. Click on the Backup Exec button in the upper left corner. From here, are global settings for the application such as connecting to a remote Back…
This tutorial will walk an individual through the steps necessary to install and configure the Windows Server Backup Utility. Directly connect an external storage device such as a USB drive, or CD\DVD burner: If the device is a USB drive, ensure i…

803 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