Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server Management Studio (SSMS) 2012: Unusually high memory usage (leaking?)

Task Manager

1.3GB memory usage. I'm running Windows 7 Ultimate 64-bit. I don't do much - just editing a stored proc (no query running in the background, nor any query result).

I do notice though, it only happens occasionally - as if some kind of a garbage collection is kicking in then it'll return to its normal (around 100MB).

Any ideas / workaround / updates ?

  • Just an update on this: it seems it doesn't happen anymore in SSMS 2014
like image 616
YS. Avatar asked Oct 29 '12 22:10

YS.


People also ask

Why is SQL Server memory usage so high?

SQL Server, in default configuration, uses as much RAM as OS is willing to give. So it is normal that Memory Usage is huge. What we should check first is if there are any Hard Faults in Resource Monitor. In this window we can see every time the OS needs to swap memory in and out between memory and disk.

How do I find a memory leak in SQL Server?

You can also get these parameters from task manager - go into the process view, choose view columns and add the relevant columns. If no processes in task manager/perfmon show a memory leak, but the overall memory is still going up, then the leak must be down at the kernel level.

Is SSMS 32 or 64 bit?

And in 2022, SSMS is still 32 bit - Microsoft Q&A.


2 Answers

It seems that if you turn off IntelliSense, the memory consumption subsides dramatically, and the software becomes much more responsive. To turn it off, go to Tools -> Options -> Text Editor -> Transact-SQL -> IntelliSense, and un-check the box. Save your work and re-start the SSMS.

The major drawback is that you will loose both IntelliSense and Code Outlining. Quite a bummer, but at least you can leave the SSMS open for days without problems.

Hope this helps. Cheers.

like image 141
Roman Avatar answered Oct 22 '22 14:10

Roman


This has been an Issue on a few version of SSMS on Stored Proc editing.

What fixed it for me in SSMS 17 was upping the intellisense "Maximum script size" from 1M to 5M. Unlimited is also available. Option found: Tools : Options : Text Editor : Transact-SQL : IntelliSense : Maximum script size. I'm not sure if this setting exists in lower versions of SSMS, please add a comment if it does.

This reduced the high cpu and memory leak (2.5G to 140M) to normal levels.

ref to msdn link

like image 39
CooPzZ Avatar answered Oct 22 '22 16:10

CooPzZ