Control SQL Server CLR Reserved Memory
- by Ryu
I've recently enabled CLR on my 64 bit SQL Server 2005 machine for usage of about 3 procs. When I run the following query to gather some info on memory usage...
select single_pages_kb+ multi_pages_kb + virtual_memory_committed_kb as TotalMemoryUsage, virtual_memory_reserved_kb
from sys.dm_os_memory_clerks
where type = 'MEMORYCLERK_SQLCLR'
I get
129 mb MemoryUsage and
6.3 gb Virtual Memory Reserved
The total memory of the machine is 21 gig. What does reserved virtual memory mean exactly and how can I control the size that is allocated? 6 gig is overkill for what we're doing and the memory would be much better utilized by the sproc cache. I'm concerned this reserved memory will cause swapping to the page file.
Please help me take back control of the memory!
Thanks