Question on SQL Server Memory usage

I am using SQL server 2012 SE. Its a VM built on Hypervhost. It has 16GB memory and the max mem I have set is 13GB. This is a staging server and right now I am not seeing anything queries or apps hitting the database. However if i go to task manager it shows sqlserver.exe is using 12835.5 MB. Shouldnt sqlserver schedulers release memory after they are used?

Thanks


  • Edited by SQLSPUser Friday, July 24, 2015 4:21 PM
July 24th, 2015 4:01pm

The reason I am asking is developers are complaining the server is slow from a couple of days. So I was wondering if memory needs to be added or if memory is the issue.
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 4:21pm

SQL Server is not going to release memory once it's allocated unless the OS asks for it. If there is no memory pressure then this will not happen. It's basically staying alert for the next request that comes in and it keeps its buffers intact.

  • Proposed as answer by Daniel Janik Friday, July 24, 2015 7:40 PM
  • Unproposed as answer by Daniel Janik Friday, July 24, 2015 7:43 PM
July 24th, 2015 4:25pm

This is normal and expected behavior.

Please see:

https://support.microsoft.com/en-us/kb/321363

  • Proposed as answer by Daniel Janik Friday, July 24, 2015 7:40 PM
Free Windows Admin Tool Kit Click here and download it now
July 24th, 2015 5:53pm

To add more DO NOT refer to task manager to get SQl Server memory utilization it will not show correct value when SQl Server service account has locked pages in memory privilege.

>Shouldnt sqlserver schedulers release memory after they are used?

No, please note the process of requesting and granting memory is resourceful and costly operation which database engine is not going to do every time. So once SQL Server is allocated memory it is allowed to hold it unless OS flags Low memory notification seeing this SQl Server will trim down its cache so its ONLY reactive not proactive. And this is how code is written

July 27th, 2015 3:24am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics