时间:2021-07-01 10:21:17 帮助过:28人阅读
如何控制CLR的内存消耗?
Appendix 由于查询内存消耗的脚本
select top 11 mc.type,mc.name, sum(mc.pages_kb) as AllocatedPages_KB, sum(mc.virtual_memory_reserved_kb) as VM_Reserved_KB, sum(mc.virtual_memory_committed_kb) as VM_Committed_KB, --sum(mc.shared_memory_reserved_kb) as ShareMem_Reserved_KB, --sum(mc.shared_memory_committed_kb) as ShareMem_Committed_KB, max(mc.page_size_in_bytes)/1024 as SinglePageSize_KB from sys.dm_os_memory_clerks mc group by mc.type,mc.name order by AllocatedPages_KB desc,mc.type,mc.name; SELECT top 111 object_name, counter_name, instance_name, cntr_value, cntr_type FROM sys.dm_os_performance_counters where counter_name like N‘%clr%‘ order by cntr_value desc
Clerk:MEMORYCLERK_SQLCLR
标签: