Hi ExpertsNeed help and guidance on an on-going memory issue on an SQL 2014 SSIS server. I am not sure how to isolate things here or where to start to avoid below memory warnings in the errorlog.Brief Problem description :========================We have an Datawarehouse environment wherin a lot of ssis packages run every 15 mins as a part of SQL Agent jobs which are scheduled every 15 mins/4hours depending on source system availability.Having said that, I am seeing some memory related messages from SQL Server ERRORLOG. More importantly, I would like to know why am I seeing appdomain errors on 64-bit servers.Based on my knowledge, usually we used to see appdomain errors on 32 bit systems when MTL (mem-to-leave) portion is less.Could anybody please explain why we are seeing these errors and how can I avoid or minimise such errors.Enviroment===========SQL Server details====================Microsoft SQL Server 2014 (SP1-CU5) (KB3130926) - 12.0.4439.1 (X64) Enterprise Edition: Core-based Licensing (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor)OS information and Memory information========================================OS Name Microsoft Windows Server 2012 R2 DatacenterVersion 6.3.9600 Build 9600System Manufacturer Microsoft CorporationSystem Model Virtual MachineSystem Type x64-based PCProcessor Intel(R) Xeon(R) CPU E5-4650L 0 @ 2.60GHz, 2600 Mhz, 8 Core(s), 8 Logical Processor(s)Time Zone Pacific Daylight TimeInstalled Physical Memory (RAM) 56.0 GBTotal Physical Memory 56.0 GBAvailable Physical Memory 21.1 GBTotal Virtual Memory 75.9 GBAvailable Virtual Memory 38.2 GBPage File Space 19.9 GBFrom Errorlog ( i see a lot of below errors getting repeated every now and then)========================2016-09-19 07:13:40.79 spid9s AppDomain 186 (master.sys[runtime].418) is marked for unload due to memory pressure.2016-09-19 07:13:40.79 spid9s AppDomain 185 (mssqlsystemresource.dbo[runtime].417) is marked for unload due to memory pressure.2016-09-19 07:13:40.79 spid36s AppDomain 186 (master.sys[runtime].418) unloaded.2016-09-19 07:13:40.79 spid9s AppDomain 184 (SSISDB.dbo[runtime].416) is marked for unload due to memory pressure.2016-09-19 07:13:40.79 spid9s AppDomain 185 (mssqlsystemresource.dbo[runtime].417) unloaded.2016-09-19 07:13:40.79 spid9s AppDomain 184 (SSISDB.dbo[runtime].416) unloaded.2016-09-19 07:14:18.92 spid92 AppDomain 187 (SSISDB.dbo[runtime].419) created.2016-09-19 07:14:19.02 spid92 Unsafe assembly 'microsoft.sqlserver.integrationservices.server, version=12.0.0.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil' loaded into appdomain 187 (SSISDB.dbo[runtime].419).select * from sys.assembliesname principal_id assembly_id clr_name permission_set permission_set_desc is_visible create_date modify_date is_user_definedMicrosoft.SqlServer.Types 4 1 microsoft.sqlserver.types, version=12.0.0.0, culture=neutral, publickeytoken=89845dcd8080cc91, processorarchitecture=msil 3 UNSAFE_ACCESS 1 2012-02-10 20:16:00.850 2012-02-10 20:16:01.437 0select * from sys.dm_clr_appdomainsappdomain_address appdomain_id appdomain_name creation_time db_id user_id state strong_refcount weak_refcount cost value compatibility_level total_processor_time_ms total_allocated_memory_kb survived_memory_kb0x00000002EC1E0200 196 SSISDB.dbo[runtime].429 2016-09-21 23:31:36.770 6 1 E_APPDOMAIN_SHARED 1 5 406918 7109194 110 2875 2125677 11180x0000001877BDC200 113 master.sys[runtime].233 2016-08-26 12:44:34.450 1 4 E_APPDOMAIN_SHARED 48 1 8192 168820727 120 0 643 362select * from sys.dm_clr_loaded_assembliesassembly_id appdomain_address load_time65537 0x00000002EC1E0200 2016-09-21 23:31:37.183 -- perfmon counter valuescounter_name Mem_GBTarget Server Memory (KB) 23GBTotal Server Memory (KB) 23GB- highest memory consumers-- Memory Clerk Usage for instance (Query 43) (Memory Clerk Usage)-- Look for high value for CACHESTORE_SQLCP (Ad-hoc query plans)SELECT TOP(10) mc.[type] AS [Memory Clerk Type],CAST((SUM(mc.pages_kb)/(1024.0 *1024)) AS DECIMAL (15,2)) AS [Memory Usage (GB)], CAST((SUM(mc.pages_kb)/1024.0) AS DECIMAL (15,2)) AS [Memory Usage (MB)]FROM sys.dm_os_memory_clerks AS mc WITH (NOLOCK)GROUP BY mc.[type]ORDER BY SUM(mc.pages_kb) DESC OPTION (RECOMPILE);goMemory Clerk Type Memory Usage (GB) Memory Usage (MB)MEMORYCLERK_SQLBUFFERPOOL 17.32 17738.16MEMORYCLERK_SQLQERESERVATIONS 5.43 5555.73USERSTORE_DBMETADATA 1.51 1550.21CACHESTORE_SQLCP 1.40 1435.45OBJECTSTORE_LOCK_MANAGER 0.41 423.16MEMORYCLERK_SQLSTORENG 0.17 175.15MEMORYCLERK_SOSNODE 0.05 55.57MEMORYCLERK_SQLCLR 0.03 33.36CACHESTORE_OBJCP 0.03 31.02USERSTORE_SCHEMAMGR 0.02 17.00 --Buffer pool distribution-- Per database DataCache usage inside buffer poolSELECTCASE database_id WHEN 32767 THEN 'ResourceDB' ELSE DB_NAME(database_id) END as "DatabaseName",COUNT(*) PageCount,CAST(COUNT(*) * 8 / 1024.0 AS NUMERIC(10, 2)) as "Size (MB)-Only DataCache-in-BufferPool"From sys.dm_os_buffer_descriptors--WHERE database_id = DB_ID('DUMMY')GROUP BY db_name(database_id),database_idORDER BY "Size (MB)-Only DataCache-in-BufferPool" DESC OPTION (RECOMPILE);goDatabaseName PageCount Size (MB)-Only DataCache-in-BufferPoolSSISDB 2004259 15658.27Alerting 155376 1213.88tempdb 52595 410.90demoConfig 34753 271.51msdb 20619 161.09ResourceDB 2338 18.27master 370 2.89db1 242 1.89model 97 0.76db3 32 0.25-- See external dll's or modules getting loaded into sql server address spaceselect base_address,convert(varchar(20),file_version) file_version,convert(varchar(20),product_version) product_version,convert(varchar(30),company) company,convert(varchar(42),[description]) [description],namefrom sys.dm_os_loaded_moduleswhere company not like '%Microsoft%'--no outputSELECT name, value_in_useFROM sys.configurations WITH (NOLOCK)where name in ('max server memory (MB)','min server memory (MB)','optimize for ad hoc workloads','xp_cmdshell','priority boost','lightweight pooling','clr enabled','affinity I/O mask','affinity64 I/O mask','affinity mask','affinity64 mask','max degree of parallelism','cost threshold for parallelism','fill factor (%)','network packet size (B)')ORDER BY name OPTION (RECOMPILE);name value_in_useaffinity I/O mask 0affinity mask 0affinity64 I/O mask 0affinity64 mask 0clr enabled 1cost threshold for parallelism 5fill factor (%) 0lightweight pooling 0max degree of parallelism 1max server memory (MB) 24000min server memory (MB) 16network packet size (B) 4096optimize for ad hoc workloads 0priority boost 0xp_cmdshell 0 Thanks,Sam
↧