Hello Folks,
I have a question with SQL Server RAM consumption, I have a customer who is running Microsoft Dynamics GP with too many users and too many applications, they had 32 GB RAM on the server and the SQL was consuming the full memory, I started the investigation and below what we did:
1. We have increased the RAM of the server to be 128 GB, their SQL Memory consumption was the same, it took all the available memory.
2. We have segregated the SQL databases into 2 clustered servers and implemented ACTIVE/ACTIVE clustering by having two instances of SQL on each server, kept the major "database" on one server and moved all other databases to the second server, the second server memory is good and stable, but the first server is still consuming the full memory of the server.
3. We started investigating the database itself, we found major consumption of SQL Memory from custom reports the users been running with un-optimized queries, we have resolved this by creating a "Log Shipping" setup for the database to a new server and moved all the reporting connections to the new server, performance of the server was enhanced a bit, but it still consuming high memory of the server and sometimes by end of the day it reaches the full server memory.
4. Upgraded from SQL Server 2005 to SQL Server 2012 with SP2!
All the above left the SQL for this database that is being used by Microsoft Dynamics GP only and for around 70 concurrent users, which we normally estimate to require 70-80 GB of memory with other customers, but here it is consuming 120 GB and sometimes users reporting slowness and "hangs" during transactions processing, and the only way to reduce the memory usage is by restarting the SQL Server service after working hours.
My questions are the following:
1. Is there a way to get a list of processes and queries that are currently consuming the SQL Server memory? I need to know what is really consuming the memory to take actions accordingly, I tried the "Processes" tab of the "Activity Monitor", but the "Memory Use" column is always between 16 and 24 KB for each query, is there a way to get a break down for all queries that is consuming the memory, so the summation of these will represent the actual memory usage? I found too many scripts over the internet but none returned what I am looking for.
2. Lets say the a big process was initiated and caused the SQL to consume the server memory, is there a way to release this memory usage after the disposal of the process? So the SQL memory usage returns back to the normal situation?
Regards,
Mohammad R. Daoud - Dynamics GP MVP
Regards, Mohammad R. Daoud MVP, MCP, MCBMSP, MCTS, MCBMSS Mob: +962 - 79 -999 65 85 mohdaoud@gmail.com http://mohdaoud.blogspot.com/