|
SQL not releasing memory Posted: 14 Jun 2007 10:35 AM |
We've been doing some heavy load testing on an app we created, and we found that after 12 hours of load testing the SQL Server is not releasing some of the memory. My question is, how do we determine where the memory is not released?
Thanks in advance for any help you can offer. |
|
|
 |
|
|
Re: SQL not releasing memory Posted: 14 Jun 2007 05:20 PM |
SQL Server is not supposed to release memory en mass - this is intentional behaviour.
Unlike desktop applications which expect to share memory resources with other apps running on a desktop, SQL Server is designed to use memory as if it is the only application running on the server (because it usually is).
SQL Server lifts table data off disk & into memory whilst executing queries. To save it having to do this over & over (disk IO is very slow), it "caches" this data so that future queries which access the same data run faster by accessing data in memory (electronically vs mechanically).
So SQL Server is sort of like a big caching system with various other smarts. It deliberately hangs on to the memory it reserves in an endeavour to run future queries faster.
When under pressure, it does have some smarts to release memory for other programs, but other than this it is fundamentally different from regular desktop apps
HTH
Greg Linwood |
|
|
 |
|
|
Re: SQL not releasing memory Posted: 14 Jun 2007 06:23 PM |
Hi Greg,
This is very helpful and very informative. Thanks a million! |
|
|
 |
|