Apr 29, 2016, 10:35 AM
[CLOSED] Memory fragmentation problems with Transormer.NET
Hi,
I issue a performance pb with an application due to large object heap consuming memory in the IIS process
The analyse of a memory dump of the w3wp process show that Transformer.NET.ItemTag is storing most of the LOH html pages in form of strings.
So my questions are :
Are you aware on such an issue ?
Is there a way to avoid this ?
Here is a short resume of the analysys
As seen in the summary table below, free objects are taking up almost 1 GB and System.String object are taking 652 Mb.
I issue a performance pb with an application due to large object heap consuming memory in the IIS process
The analyse of a memory dump of the w3wp process show that Transformer.NET.ItemTag is storing most of the LOH html pages in form of strings.
So my questions are :
Are you aware on such an issue ?
Is there a way to avoid this ?
Here is a short resume of the analysys
As seen in the summary table below, free objects are taking up almost 1 GB and System.String object are taking 652 Mb.
00007ffaf7e8fc38 31020 4026528 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[Avanteam.Formulars.IApsOption, Avanteam.Formulars]][]
00007ffaf67a3c20 33754 4050480 System.Web.UI.LiteralControl
00007ffaf7605418 173251 5544032 System.Web.UI.StateBag
00007ffaf67a3f98 103033 5769848 System.Web.UI.ControlCollection
00007ffaf4cacf78 124757 5988336 System.Text.StringBuilder
00007ffaf772f720 27078 6065472 System.Data.SqlClient._SqlMetaData
00007ffaf6527ab0 13098 6706176 System.Data.DataTable
00007ffaf66f7620 57201 6864120 System.Data.SimpleType
00007ffaf7d89ea0 21229 7623408 System.Collections.Generic.Dictionary`2+Entry[[System.Int32, mscorlib],[System.Object, mscorlib]][]
00007ffaf4f96838 211520 8460800 System.Collections.Specialized.HybridDictionary
00007ffaf4f96a98 178691 8577168 System.Collections.Specialized.ListDictionary
00007ffaf4e9e0e8 217760 8710400 System.Collections.ArrayList
00007ffaf85d5a58 225196 9007840 Avanteam.Kernel.Schema.APSColumn
00007ffaf5099978 201501 9672048 System.Collections.ArrayList+ArrayListEnumeratorSimple
00007ffaf76059b8 326320 10442240 System.Web.UI.StateItem
00007ffaf85d29c8 208441 13340224 Avanteam.Kernel.Schema.APSField
00007ffaf7a52b60 354541 14181640 System.Web.UI.ControlCollection+ControlCollectionEnumerator
00007ffaf7752258 74408 14286336 System.Data.SqlClient.SqlParameter
00007ffaf5044d18 376816 15072640 System.Collections.Specialized.ListDictionary+DictionaryNode
00007ffaf66f2238 27283 15127920 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Data.DataColumn, System.Data]][]
00007ffaf512de08 15935 16543888 System.Double[]
00007ffaf678e710 215139 17211120 System.Data.Common.StringStorage
00007ffaf66cdf70 193828 18607488 System.Data.DataRow
00007ffaf4e58b80 62970 21432912 System.Collections.Hashtable+bucket[]
00007ffaf851b7b8 209310 21768240 Avanteam.Documents.DataSets.DSDocuments+FieldDefinitionsRow
00007ffaf52f4ac8 13650 22535376 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.String, mscorlib]][]
00007ffaf4f77cf8 30079 31762024 System.DateTime[]
00007ffaf4e57990 432588 40824924 System.Int32[]
00007ffaf66f44f8 32066 54797104 System.Data.RBTree`1+Node[[System.Data.DataRow, System.Data]][]
00007ffaf669c7d8 326615 70548840 System.Data.DataColumn
00007ffaf6789070 49280 72912896 System.Data.RBTree`1+Node[[System.Int32, mscorlib]][]
00007ffaf54ff2e8 2504955 80158560 System.ResolveEventArgs
00007ffaf4cf1538 58152 123882204 System.Byte[]
00007ffaf4cac5c8 422155 132354080 System.Char[]
00007ffaf4c5be30 1351930 409909384 System.Object[]
00007ffaf4ca4d18 3909705 652648888 System.String
0000005934696110 23551 1056192938 Free
When I dumped out System.String objects in LOH, I see these are whole page html stored as a string object.<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="/eCS/extjs/resources/ext_theme_gray/ext-theme-gray-all-embedded-css/ext.axd?v=31210" id="ext-theme" />
<link type="text/css" rel="stylesheet" href="/eCS/extnet/resources/css/extnet-all-embedded-css/ext.axd?v=31210" id="extnet-styles" />
<script type="text/javascript" src="/eCS/extjs/ext-all-js/ext.axd?v=31210"></script>
<script type="text/javascript" src="/eCS/extnet/extnet-all-js/ext.axd?v=31210"></script>
<script type="text/javascript" src="/eCS/extnet/locale/ext-lang-fr-js/ext.axd?v=31210"></script>
<link rel="stylesheet" type="text/css" href="/eCS/DXR.axd?r=1_8-yQjza" /><link rel="stylesheet" type="text/css" href="/eCS/DXR.axd?r=1_9-yQjza" /><link rel="stylesheet" type="text/css" href="/eCS/DXR.axd?r=1_1-yQjza" /><title>
</title><link href="../../Styles/css/document.css" type="text/css" rel="stylesheet" /><link href="../../Styles/StyleSheet.css" type="text/css" rel="stylesheet" /><style type="text/css">.hidden { display:none; }</style><link href="/eCS/Styles/Onglets.css" type="text/css" rel="stylesheet" />
<script type="text/javascript">
//<![CDATA[
Ext.net.ResourceMgr.init({id:"DocumentMenu_1$ResourceManager1",aspForm:"form1",theme:"gray",ns:[""],appName:"eCS"});Ext.onReady(function(){Ext.ns("Ext.net.DirectMethods");Ext.apply(Ext.net.DirectMethods, { DoArchiveDocument:function(comment,config){return Ext.net.DirectMethod.request("DoArchiveDocument",Ext.applyIf(config || {}, {params:{comment:comment},control:"DocumentMenu_1_Toolbox1"}));} });});
//]]>
</script>
</head>
<body>
<form name="form1" method="post" action="./M_page1.aspx?Open&IdDoc=6c25d2a0-b87f-4ddc-ab73-b66e58328936&tabkey=6c25d2a0-b87f-4ddc-ab73-b66e58328936&_dc=1461066481311&_dc=1461066483858" onsubmit="javascript:return WebForm_OnSubmit();" id="form1" enctype="multipart/form-data">
<div>
<input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
<input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
<input type="hidden" name="ctl04_HiddenField" id="ctl04_HiddenField" value="" />
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTMxNjQ3MDk0Mw8WBh4QRG9jdW1lbnRVbmlxdWVJZAUkNmMyNWQyYTAtYjg3Zi00ZGRjLWFiNzMtYjY2ZTU4MzI4OTM2Hg1Jc05ld0RvY3VtZW50aB4JTGFzdExvZ0lkBSRjNjc2NmJmOC1hMzFlLTRiNWMtYjBmMC00MzE5ZGI5OGUyNDgWAgIDDxYCHgdlbmN0eXBlBRNtdWx0aXBhcnQvZm9ybS1kYXRhFiYCBA9kFh4CCg8PF....
.
.
.
I ran few scripts to find where are these large strings created or rooted from and I see most of them are coming from Transformer.NET.ItemTag operation.Thread 2704:
0000005c763bdc70 00007ffaf82f3664 Transformer.NET.TokenSelector.Place(System.Text.StringBuilder, Transformer.NET.Token)
r13:
-> 0000005982a488f8 Transformer.NET.ItemTag
-> 0000005982a3ffc0 Ext.Net.ExtNetTransformer
-> 0000005982a40088 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[Transformer.NET.TokenSelector, Transformer.NET]]
-> 0000005982a404b8 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[Transformer.NET.TokenSelector, Transformer.NET]][]
-> 0000005982a400d8 Transformer.NET.TokenSelector
-> 00000059b6834b88 System.Text.RegularExpressions.Regex
-> 00000059b6834c40 System.Text.RegularExpressions.ExclusiveReference
-> 00000059b686ac90 System.Text.RegularExpressions.CompiledRegexRunner
-> 0000005c3c119c68 System.String
Last edited by dlefevre; Apr 29, 2016 at 10:45 AM.
Reason: precision of context (server side issue)