How To manage Memory Usage of sql server?
sql-server, sql-server-2008
Solution
Check in the Memory pane of the Server Properties window (in Server Management Studio right click the database server icon in the Object Explorer and choose Properties) that value for Maximum server memory. We've found that allocating slightly less than the total memory in the machine works well.
Slightly less than the total memory because we don't want the OS forced into virtual memory.
SQL Server will take as much memory as it requires, up to this limit. Limiting this to the amount of physical memory forces SQL Server to optimise queries to use tempdb rather than using virtual memory. We've found this to be better.
If SQL Server isn't using all the memory then it may simply not need it. This has been our experience with some of our servers. Bottlenecks may lie elsewhere---probably disc IO---so the next steps are to start to understand what queries are running and why the're slow...
Problem
I have a sql srever 2008 instance , a development server. All the developers work simultaneously on the server on different databases. The memory usage of RAM goes more than 2GB and total RAM of the server is 4GB . There is no blocked processes in the sys.sysprocesses list. The sum(memusage) is only 190 and total current process connected i.e count(*) is 111 from sys.sysprocesses. I have configured a powershell script which gives alert on the process sql server more than 2000 MB usage. I am getting alert continuously. I don`t find any solution for this that what to do on this condition. I am confused in sum(memusage) =190 and RAM usage 2000+MB . Where does the rest processes consuming the RAM. Please help me out. Thanks Nitesh Kumar