Control SQL Server CLR Reserved Memory

Posted by Ryu on Stack Overflow See other posts from Stack Overflow or by Ryu
Published on 2009-04-27T15:28:24Z Indexed on 2010/04/11 10:03 UTC
Read the original article Hit count: 234

Filed under:
|
|
|

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

© Stack Overflow or respective owner

Related posts about sqlclr

Related posts about memory