Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > w3wp.exe High CPU Utilization

Reply
Thread Tools

w3wp.exe High CPU Utilization

 
 
mcollier
Guest
Posts: n/a
 
      03-11-2005
I am experiencing high CPU utilization with my ASP.NET application.
The w3wp.exe process uses 75%-80% CPU for about 10 seconds. I notice
this when the application first starts up, which I can partially
understand since ASP.NET compiles the application on the first access.
However, I also notice the high CPU usage by w3wp.exe after long
periods of inactivity. For example, if I stop using the site for 30
minutes, and then come back to the site, I see the CPU usage spike
again. As long as I continue to use the site, it is very fast.

I'm using Windows Server 2003. I have not changed any configuration
settings in ASP.NET or the .NET Framework (i.e. the machine.config
file). I have several (less than 10) assemblies in my application's
\bin directory.

I put simple log statements (to the Windows event log) in my
application's Application_Start() method. Work performed there takes
approximatley 3 seconds. So far I am unable to determine where the
remaining approximately 7 second delay comes from.

Any suggestions on places to look to determine and reduce the
application's start-up time would be greatly appreciated.


Thank You

 
Reply With Quote
 
 
 
 
Sherif ElMetainy
Guest
Posts: n/a
 
      03-11-2005
Hello

The default IIS 6 setting for an application is shutdown worker processes
after being idle for 20 minutes. So when a new request comes after 30
minutes of being idle a you said, IIS will start and initialized the worker
process again. It will JIT compile every method in your application at first
access. So you will experience a great delay on first access. You can change
this setting (and other performance settings) from IIS manager, under
Application Pools.

Best regard,
Sherif

"mcollier" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> I am experiencing high CPU utilization with my ASP.NET application.
> The w3wp.exe process uses 75%-80% CPU for about 10 seconds. I notice
> this when the application first starts up, which I can partially
> understand since ASP.NET compiles the application on the first access.
> However, I also notice the high CPU usage by w3wp.exe after long
> periods of inactivity. For example, if I stop using the site for 30
> minutes, and then come back to the site, I see the CPU usage spike
> again. As long as I continue to use the site, it is very fast.
>
> I'm using Windows Server 2003. I have not changed any configuration
> settings in ASP.NET or the .NET Framework (i.e. the machine.config
> file). I have several (less than 10) assemblies in my application's
> \bin directory.
>
> I put simple log statements (to the Windows event log) in my
> application's Application_Start() method. Work performed there takes
> approximatley 3 seconds. So far I am unable to determine where the
> remaining approximately 7 second delay comes from.
>
> Any suggestions on places to look to determine and reduce the
> application's start-up time would be greatly appreciated.
>
>
> Thank You
>



 
Reply With Quote
 
 
 
 
mcollier
Guest
Posts: n/a
 
      03-14-2005
Why does it have to JIT it each time the process is started? I noticed
what appear to be compiled versions of the pages under the
"C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET Files"
directory. Wouldn't these pages be used when the worker process
restarts?

Do you know of a MSDN, or similar, site that discusses this process? I
would like to learn more about how this works.


Thanks!

 
Reply With Quote
 
Alvin Bruney [ASP.NET MVP]
Guest
Posts: n/a
 
      03-14-2005
one reason is that a restart may mean that files have changed. if this is
the case, then some assemblies need to be recompiled and the jit cache
should be flushed accordingly if the methods come from these dirty
assemblies

--
Regards,
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
_________________________


"mcollier" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Why does it have to JIT it each time the process is started? I noticed
> what appear to be compiled versions of the pages under the
> "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET Files"
> directory. Wouldn't these pages be used when the worker process
> restarts?
>
> Do you know of a MSDN, or similar, site that discusses this process? I
> would like to learn more about how this works.
>
>
> Thanks!
>



 
Reply With Quote
 
Sherif ElMetainy
Guest
Posts: n/a
 
      03-14-2005
Hello

The compiled in in Temp ASP.NET files are IL dlls not native dlls they have
to be JIT compiled at runtime. The JIT compiler compiles the code to memory
and doesn't save a copy of the native code to disk. So all JIT compiler's
work is lost when the process is terminated.
The performance hit when the process is restarted is not only due to JIT. It
is also because of the process itself loading.

As I said the process restarts in your case were due to 20 minutes idle
timeout. You can simply avoid them by modifying your IIS settings. In a
production scenario, the traffic is usually higer such that the worker
process should never be idle for more than 20 minutes.

Best regards,
Sherif

"mcollier" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
> Why does it have to JIT it each time the process is started? I noticed
> what appear to be compiled versions of the pages under the
> "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temp orary ASP.NET Files"
> directory. Wouldn't these pages be used when the worker process
> restarts?
>
> Do you know of a MSDN, or similar, site that discusses this process? I
> would like to learn more about how this works.
>
>
> Thanks!
>



 
Reply With Quote
 
mcollier
Guest
Posts: n/a
 
      03-17-2005
Is the default shutting down of the worker process just to conserve
system resources? The high CPU utilization from w3wp.exe likely due to
the JIT and reloading?

I'll need to find some good documentation on this process. Mainly so
that I can point my colleagues to it too.

 
Reply With Quote
 
jeandemo jeandemo is offline
Junior Member
Join Date: Apr 2011
Posts: 1
 
      04-13-2011
Hello,
This problem showed up for me when the Symantec Mail Security for Microsoft Exchange Version 6.0.x was installed. It did not only affect this program, but is also affected ASP, Brightmail, and Microsoft Exchange directly. In fact, I became aware of the problem when Microsoft Exchange started failing intermittently. I was actually quite confused because the problems would show up in the event logs as an ASP problem, a Brightmail problem, or a Microsoft Exchange problem. I spent many a sleepless night chasing down those particular problems only to learn that Symantec Mail Security for Microsoft Exchange Version 6.0.x uses all these programs to work. That said, I have since patched the Symantec Mail Security for Microsoft Exchange Version 6.0.x to 6.5.x and it seems to have settled down completely. I hope I have been able to help. Sincerely,
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
High CPU utilization on Cisco 1760 Bancal Cisco 3 09-19-2005 06:03 PM
2650 IP Input High CPU Utilization Problem Brian R. Jack Cisco 1 09-15-2004 09:41 AM
2650 IP Input High CPU Utilization Problem Brian R. Jack Cisco 8 09-14-2004 04:44 AM
high CPU utilization Miguel Moreno Cisco 4 01-30-2004 12:39 AM
2600XM, Frame Relay, and High CPU Utilization Donald Zelenak Jr. Cisco 5 12-06-2003 01:18 AM



Advertisments