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.
By default, SQL Server dynamically grows and shrinks the size of its buffer pool (cache) depending on the physical memory load reported by the operating system. As long as enough memory is available to prevent paging (between 4 - 10 MB), the SQL Server buffer pool will continue to grow. As other processes on the same computer as SQL Server allocate memory, the SQL Server buffer manager will release memory as needed. SQL Server can free and acquire several megabytes of memory each second, allowing it to quickly adjust to memory allocation changes.
You can establish upper and lower limits to the amount of memory (buffer pool) used by the SQL Server database engine with the
min server memory and
max server memory configuration options. Before you set the
min server memory and
max server memory options, review the references in the section titled "Memory" in the following Microsoft Knowledge Base article:
319942Â
(http://kbalertz.com/Feedback.aspx?kbNumber=319942/EN-US/
)
HOW TO: Determine Proper SQL Server Configuration Settings
Note that the
max server memory option only limits the size of the SQL Server buffer pool. The
max server memory option does not limit a remaining unreserved memory area that SQL Server leaves for allocations of other components such as extended stored procedures, COM objects, non-shared DLLs, EXEs, and MAPI components. Because of the preceding allocations, it is normal for the SQL Server private bytes to exceed the
max server memory configuration.
For additional information about allocations from this unreserved memory area, click the article number below
to view the article in the Microsoft Knowledge Base:
316749Â
(http://kbalertz.com/Feedback.aspx?kbNumber=316749/EN-US/
)
PRB: There May Not Be Enough Virtual Memory with Large Number of Databases
REFERENCES
SQL Server Books Online; topics: "Effects of min and max server memory"; "Memory Architecture"; "Memory Architecture"; "Server Memory Options"; "SQL Server Memory Pool"
For more information about the
min server memory configuration option and the
max server memory configuration option in SQL Server 2005, see the "Effects of min and max server memory" topic in SQL Server 2005 Books Online.