My SQL Server seems to take memory from the operating system, but never releases it. Is this normal?

If you are running SQL Server 7.0, SQL Server 2000, or SQL Server 2005, and have the memory setting set to dynamically manage memory (the default setting), SQL Server will automatically take as much RAM as it needs (assuming it is available) from the available RAM of the server. Assuming that the operating system or other applications running on the same physical server don’t need more RAM, SQL Server will keep control of the RAM, even if it really doesn’t need it. The reason for this is because it is more resource efficient for SQL Server to keep holding the RAM (even if it doesn’t currently need it) than to release and grab it over and over as memory needs change.

If your SQL Server is a dedicated SQL Server, it is very normal for SQL Server to take memory, and to not release it.

If you have configured SQL Server to use a minimum amount of memory (not a default setting), once SQL Server grabs this amount, it will not give it up until SQL Server is restarted, even if SQL Server does not need it and other applications running on the server need it.

If you have a non-dedicated SQL Server, and have set memory to be managed dynamically, and there are other applications running on the same physical server, SQL Server will give up some of its memory if needed. But this may not happen instantly. For example, if SQL Server needs a specific amount of memory to complete a current task, it won’t give up that memory until that task is complete. In the meantime, your other application may cause your server to have excessive paging, which can hurt performance.

If you have a situation where SQL Server and another application are “fighting” over RAM, the best solution is to either add more RAM to the server, or to move the other application off the server to another server.

]]>

Leave a comment

Your email address will not be published.