Control SQL Server CLR Reserved Memory

Control SQL Server CLR Reserved Memory

剑心龙吟 发布于 2021-11-26 字数 855 浏览 791 回复 1 原文

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

如果你对这篇文章有疑问,欢迎到本站 社区 发帖提问或使用手Q扫描下方二维码加群参与讨论,获取更多帮助。

扫码加入群聊

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

过气美图社 2022-06-07 1 楼

You are running 64 bit, so VAS (virtual memory) is a non-issue.

The virtual memory is not actually used, or allocated. It has merely reserved the address range.