Solved

Sql server Memory Issue

Posted on 2016-08-14
5
55 Views
Last Modified: 2016-08-15
Hi,
When iam checking SQL Logs i found following message
is marked for unload due to memory pressure

Why this kind of issue happening?
0
Comment
Question by:ukerandi
5 Comments
 
LVL 68

Assisted Solution

by:Qlemo
Qlemo earned 83 total points
ID: 41755657
Another process has requested memory currently occupied by the SQL Server instance. SQL Server monitors memory usage of other processes for exactly that reason: to be able to deallocate own memory used for buffering data (to improve speed). Memory allocation and consumption is dynamic for MS SQL.

If this happens once a day e.g. because of a backup or other nightly processes temporarily requiring a lot of memory, it is no issue. If you get the message a lot while working hours, you should monitor memory consumption of all processes, and then decide whether it is correctable at that other process or only by adding more RAM to your machine.
0
 
LVL 7

Assisted Solution

by:Phil Davidson
Phil Davidson earned 83 total points
ID: 41755735
For further information, you can go to this link.  

The above link is useful if are using CLRs or if this is a problem.  If you know of no problems, then the information you are seeing is not something to cause you alarm.  You may not need to do anything about it.
0
 
LVL 78

Assisted Solution

by:David Johnson, CD, MVP
David Johnson, CD, MVP earned 83 total points
ID: 41755757
SQL server by default is set to use as much memory as available (the high limit is set at some unreachable number 1.6PB (I think)
A good guideline is: Gene Barrys Suggested Settings http://bit.ly/2bvTiBm
Physical RAM                        MaxServerMem Setting
2GB                                           1500
4GB                                           3200
6GB                                           4800
8GB                                           6400
12GB                                         10000
16GB                                         13500
24GB                                         21500
32GB                                         29000
48GB                                         44000
64GB                                         60000
72GB                                         68000
96GB                                         92000
128GB                                       124000

This greatly depends upon the sql server load, size of databases, memory used by other than Base Operating System. If your queries start taking a long time or the CPU load/Disk Performance spike then you have to give it more memory. The machine itself may require a lot more memory.
0
 
LVL 16

Accepted Solution

by:
Malmensa earned 251 total points
ID: 41755863
Basically, whenever SQL reads anything from disk, it keeps a copy in RAM, just in case that bit of data might need to be accessed again. Generally, this means that after some time running, total memory usage approaches the size of the data files, or nearly all physical memory.

Once other applications demand memory, and it gets low, SQL will log the "marked for unload due to memory pressure" and release some of the cached memory, so that other applications can use it. Idea is to keep stuff in RAM unless there is a reason to purge it.

Exchange does the same thing, it will also use whatever RAM is available. If a user opens a 10MB .PDF file on Monday, it will stay in RAM until either the Store service is restarted, or RAM is needed for something else.

Unless you want to leave some RAM unused for some reason, it is usually OK to just let SQL do its thing. On a dedicated QQL server, it usually works fine without any manual tuning.
0
 
LVL 10

Author Closing Comment

by:ukerandi
ID: 41756441
Thanks
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

How to leverage one TLS certificate to encrypt Microsoft SQL traffic and Remote Desktop Services, versus creating multiple tickets for the same server.
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 video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

12 Experts available now in Live!

Get 1:1 Help Now