We really need an expert's view on IIS7 and I'm going to do my best to describe our problem. If you need more information please let me know and I'll retrieve it.
We have an ASP.NET website which references a couple of .NET DLLs and the performance was dramatic at our clients! On our own testserver the same set of data took 25 seconds (still not fast but that's another issue) and at our clients it took 6 minutes!
I wrote logs in every possible routine that I could think of, logging how long it took. It showed that across all the routines across all the DLL's the processing of the code simply takes longer at our clients.
To further test this I made a desktop application which references the exact same DLLs and ran this at the client. Those 6 minutes went down to... 5 seconds!!! What the... ?
We ran through all the settings in IIS7 and compared it to our IIS7 and... We are really stumped here to honestly admit. The specs of the servers at the client are even higher than ours!
Let's zoom in on the problem. We are talking for instance about a function that instantiates an object and sets 3 properties. No DB connections, nothing fancy at all, really simple:
'Creates a GeneralPractitioner
Public Shared Function Create(ByVal gp As GeneralPractitionerTO) As GeneralPractitioner
'HACK Temporarily write to a logfile.
WebHISPortaalBLL.WriteToLo
g.WriteToLog(Now.ToString("dd-MM-yyyy HH:mm:ss.fff") & " BEGIN WebHISPortaalBLL.GeneralPractitioner.Create", String.Empty, "PerformanceTest")
'Check if parameter is not nothing.
If gp IsNot Nothing Then
'Create new instance of GeneralPractitioner and set properties in object initializer.
Return New GeneralPractitioner With {.ID = gp.ID,
.Name = gp.Name,
.AGBCode = gp.AGBCode}
Else
Return Nothing
End If
End Function
The calling piece of code is a LINQ query, so there's nothing in between. And now look at the difference. First I'll post a small piece of the logfile at our testserver, look at milliseconds.
This method at our testserver:
24-11-2011 15:23:34.526 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 24-11-2011 15:23:34.527 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 24-11-2011 15:23:34.528 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 24-11-2011 15:23:34.529 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 24-11-2011 15:23:34.530 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 24-11-2011 15:23:34.530 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 24-11-2011 15:23:34.531 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 24-11-2011 15:23:34.531 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create
Same method at client's server:
25-11-2011 10:38:11.414 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 25-11-2011 10:38:11.476 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 25-11-2011 10:38:11.539 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 25-11-2011 10:38:11.601 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 25-11-2011 10:38:11.664 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 25-11-2011 10:38:11.726 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 25-11-2011 10:38:11.789 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create 25-11-2011 10:38:11.851 BEGIN WebHISPortaalBLL.GeneralPractitioner.Create
Where our testserver takes on average 1 millisecond (and actually ussually 0.5 milliseconds) to complete this task, the client's server takes 62 milliseconds on average to complete this task!
Why??
Is there anyone out there that can help us? We would appreciate any comment. Anything.