Groups | Blog | Home
all groups > dotnet performance > july 2006 >

dotnet performance : Total time spent in JIT and much more


mclaurentiu
7/6/2006 12:00:00 AM

Hi.

I have a weird problem with an ASP.NET application which uses Crystal Reports.

Sometimes (I hate this), when the ASP.NET application attempts to generate
a report, the number of threads of the w3wp increases dramatically and then
comes to a stop (probably because the thread pool is full). We've been able
to somewhat inspect the w3wp using Process Explorer (its a build environment,
no debug assemblies, no debuggers installed and no permission to install
almost anything, etc...) and we've seen an interesting behaviour:
- when pressing the button that starts the report generation, a new thread
is created (by the framework ?!) which runs GetCompileInfo;
- then, about twice per second, two or more threads are created, all of
them stuck in GetCompileInfo;
- the step above repeats itself until a critical number of threads is reached
(in my case around 440, I suppose because of the fact that maxworkerthreads
= 100 multiplied by 2 processors multiplied by hyperthreading on each processor)
and the entire w3wp comes to a halt. there is a lot of I/O and context switches,
but no noticeable CPU usage whatsoever;
- also, "% Time in JIT" is around 93% - 98%;

Some more details: .NET Framework has version 1.1.4322; the report generates
fine multiple times before the crashes (with the same report settings); we
do not use dynamic code generation;

Could you suggest anything? Some documentation, some tips, maybe?

Thanks a lot,
Laur

Greg Young
7/8/2006 8:16:45 PM
You can debug a production process with common tools like windbg (no major
installs). I would take a look what is going on using windbg .. you can find
out alot more about what is happenning as opposed to using process explorer.
If windbg is too much, atleast make a dump .. you can load up symbols on
another box.

http://www.eggheadcafe.com/articles/20060114.asp includes some basic
instructions. If you are not familiar with windbg it can be quite a learning
curve. John Robbins has a great book on the subject and there is alot of
documentation sprinkled around the internet but it will take a bit of time
until you are comfortable in what you are looking at.

Also as a warning .. windbg's interface is a umm acquired taste :)

Cheers,

Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung

I would not think it likely though to have the JIT
[quoted text, click to view]

mclaurentiu
7/10/2006 11:09:50 AM
I think I'll try a dump, it's the simplest way of dealing with it because
it is not necessary to also install the symbols. I am somewhat familiar with
windbg :P Ahhh.. the old days of softice & windbg...

However, can anyone explain why so many GetCompileInfo? The code has been
JITed long before, because the application was instaled a few months ago :(

[quoted text, click to view]

AddThis Social Bookmark Button