Solved

Sql server Memory Issue

Posted on 2016-08-14
5
67 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 69

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 79

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 17

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Read about achieving the basic levels of HRIS security in the workplace.
Most of the applications these days are on Cloud. Cloud is ubiquitous with many service providers in the market. Since it has many benefits such as cost reduction, software updates, remote access, disaster recovery and much more.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

831 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