2

Our asp.net application is currently experiencing a large number of issues around performance. Have been carrying out various investigations and currently the only thing sticking out is the "% time in JIT" performance counter for the worker process.

On one site, this tends to spike up to 90-95% constantly, but struggling to identify if this has any real meaning or is simply a red herring. The site is published in release mode, with the compilation debug flag set to false, full JIT occurs upon initial load as expected, however, when navigating around the site, we still get these constant spikes in the JIT time counter. Is anyone able to help with knowing how this time is calculated and if it is a reliable indicator of performance?

On an even more bizzare note, testing the web app on a local IIS install, I have noticed that again, the initial JIT occurs as expected but the spike in the "% time in JIT" counter only occurs on the initial load of each individual page - if I then immediately refresh that page, the counter remains at 0. If I wait a couple of minutes and then refresh that page again, the counter spikes. Is there a reason this should be happening? It is almost as if the page is JIT compiled then cached for a couple of minutes.

The points that I have been looking at so far in relation to this counter are LINQ queries, regular expressions and calls via reflection, but not having much luck.

Any advice/assistance much appreciated, Thanks.

hdougie
  • 344
  • 4
  • 9
  • did you try to ngen? http://stackoverflow.com/questions/385841/does-it-help-to-use-ngen – Arsen Mkrtchyan Nov 29 '12 at 14:55
  • Any crazy settings on app pool? – matt-dot-net Nov 29 '12 at 14:56
  • Can you profile the app or attach a debugger? – usr Nov 29 '12 at 15:11
  • Not tried NGEN but have been looking at it, so will take another look now. Not sure if it will solve the current problem but wouldn't hurt to try. Only downside to the NGEN is having to run it on the hosting machine (Web server in this case). No "crazy" settings that I'm aware of and have memory profiled but nothing is really screaming out. – hdougie Nov 29 '12 at 15:32
  • Have you checked the event logs to see if this coincides with the app pool recycling (does the jit only happen after an app pool recycle?) – Brian Ball Nov 29 '12 at 15:59
  • Hi Brian, can confirm that this is not a result of app pool recycle. We have our pools set to only recycle once every 24 hours (out of hours). – hdougie Nov 29 '12 at 16:06
  • Please profile for CPU. I don't think allocations are the problem as you have high JIT time not high GC time. – usr Nov 29 '12 at 16:40

1 Answers1

0

Have you verified that you've turned off debug in the web.config file?

<compilation debug="false"/>

You can also omit the debug attribute as the default value is false, but for troubleshooting purposes I would explicitly set it.

Brian Ball
  • 12,268
  • 3
  • 40
  • 51
  • Thanks, but yes we have this set. As part of our build process we ensure that this value is set to false. – hdougie Nov 29 '12 at 15:46