Windows 2008 R2 Memory is always full


We have a Windows 2008 R2 on a HP Server with 24GB of RAM. The only important software installed is SQL Server 2008 R2 and almost no feature or role is enabled on this Windows.

But the problem is that always RAM is almost full. When we look at performance in Task Manager or memory part of Resource Monitor or third party programs, we see that about 97%-99% of 24GB RAM is occupied but summation of all processes' used memory is something less than 1GB.

If this percentage of RAM is used, why windows can not show what processes are using this amount of memory? and if not, why windows says that RAM is full?

Best Answer

SQL Server uses all the memory available. It's not a bug, it's by design. That's also why SQL Server must be installed on dedicated machines (and not together with IIS for example).

When running for a long time, SQL Server stores the data according to the executed queries, so that they are faster to execute later. This means that when you start the server, the memory usage will be low, but will grow over time.

You can adjust the memory limit to use by SQL Server, but you shouldn't do that unless you have serious reasons for it.

Here is a quote from How to adjust memory usage by using configuration options in SQL Server on Microsoft Support website:

When you start SQL Server, SQL Server memory usage may continue to steadily increase and not decrease, even when activity on the server is low. Additionally, the Task Manager and Performance Monitor may show that the physical memory available on the computer is steadily decreasing until the available memory is between 4 to 10 MB.

This behavior alone does not indicate a memory leak. This behavior is normal and is an intended behavior of the SQL Server buffer pool.