I have a web application written in C# .NET 3.5 using Visual Studio 2010 that consumes a web service exposed by Websphere for z/OS. The web application is hosted on Windows Server 2008 64bit/IIS 7. The first call to the WS takes 155000 ms to execute, but the service responded in less than one second (verified on server). The subsequent calls to the WS takes about 45 ms. During the long running time, the worker process consumes all cpu and allocates more than 2Gb of memory. When it becomes responsive the memory allocated drop down to 250 Mb and subsequent calls take, as I said, about 45 ms. This behaviour doesn't happen on my workstation (Windows 7 64 bit) and on a server wtih Windows Server 2003 32 bit and IIS 6. I also tried to generate the serializers/deserializers with no effect. Any ideas?
Asked
Active
Viewed 3,907 times
0
-
Instrumentation. You first have to understand what's going on... – Adriano Repetti Jul 16 '14 at 09:44
-
I know from JAVA (and C# may behave similar) when the service is run the first time, the actual classes have to be generated, meaning the assemblies are built. That may take some time. So as long at it does not affect your response-time during production-time, I won´t care about it. – MakePeaceGreatAgain Jul 16 '14 at 09:46
-
For me this is an issue. The problem come up again after a while that the application is not "stimulated", perhaps after a session expiration (I tried after 30 minutes). It seems that the Garbage Collector as thrown away something and that asp.net have to rebuild this thing. – user3844117 Jul 16 '14 at 10:08
-
Today I will meet with Microsoft engineers to try to solve this problem. I can't understand, however, why the same problem does not occur on the machine with Windows Server 2003/IIS6. I believe that everything is due to Windows Server 2008/IIS7. – user3844117 Jul 18 '14 at 06:46
1 Answers
1
After a long time, I discovered that this is a problem related to 64bit environment and Microsoft knows the problem. I had no response from Microsoft for a solution. After a long search I found this article XmlSerializer startup HUGE performance loss on 64bit systems that says to add this parameter to the web.config:
<configuration>
<system.diagnostics>
<switches>
<add name="XmlSerialization.Compilation" value="4"/>
</switches>
</system.diagnostics>
</configuration>
I tested this solution and the time taken to deserialize the soap stream has dropped to 2 seconds. Not so bad. The drawback is that the temp directory gets flooded by temporary files. Now the question is: why enabling this switch the time drops down? There is some other switch I can try without keeping the temp files?

Community
- 1
- 1

user3844117
- 21
- 1
- 4