views:

577

answers:

5

Hello Folks:

Our ASP.Net 2.0 web app was running happily along on Windows Server 2003. We were starting to see some of the limits of the environment approaching, such as memory and CPU usage spikes, and as we're getting ready to scale we decided it was time for a larger server with higher availability.

We decided to move to Windows Server 2008 to take advantage of IIS 7's shared configuration. In our development and integration environments, we reproduced the OS and app in 2008/IIS 7 and everything seemed fine. But truth be told, don't have a good way of simulating production-like loads as of yet, nor can we reproduce our prod environment accurately (we're small with limited resources). So once we rolled out to production, we were surprised to find performance significantly worse on 2008 than it was on 2003.

We've also moved from a 32-bit environment to 64-bit in the process, and we've also incorporated ASP.Net 3.5 dll's into the project.

Memory usage is through the roof, but I'm not as worried about that. We believe in part this is because of the overhead with Server 2008's memory, so throwing more RAM at it may solve that issue. The troubling thing is we're seeing processor spikes to 99% CPU Utilization, which we've never seen before in the 2003/IIS 6 environment.

Has anyone encountered these issues before and are there any suggestions for a solution/places to look? Right now we're doing the following:

1) Buying time by adding memory.

2) Buying time by setting app pool limits: shut down w3wp.exe when CPU hits 99% load. Since you don't have the option to recycle the app pools, I have a scheduled task running that recycles any stopped app pools.

3) Profiling the app pools under Classic and Integrated modes to see which may perform better.

Any other ideas are completely welcome.

+1  A: 

Our experiance is that code runs much faster on a 64bit windows 2008 than on a 32bit windows 2003 server.

I am wondering if something else is also running on the machine. For example is SQL Server installed with a maintainence plan that could cause the CPU spike.

I would check the following:

  • Which process is using the CPU?
  • Is there a change in the code? Try installing the new code on the old machine
  • Is it something to do with the compile options? Is the CPU usage a recompile?
  • Are there any errors in the event log?
Shiraz Bhaiji
The processes spiking the CPU are the worker processes themselves. It seems to be an intermittent issue that occurs when the app pools spin up. W3WP.exe hit 99%, but if you kill it, it will behave next time it spins up. Another user reported something similar here on Stack Overflow.The code is the same.The compile options is a good call. I will take a look at those. And the event log, we've scanned, but I'll take a deeper look.Thanks so much for your time answering my question.
Larry Dallas
Whoa! You've put the fear of god in me. I am going to be very vary of upgrading my servers to 2008 until I hear more about this.
Cyril Gupta
@Larry could you check the code that you have in any initializers / constructors.
Shiraz Bhaiji
A: 

Same problem with our current setup, From win2k3 server x86/IIS6 to win2k8 x64/IIS7

CPU 100% and still holding

http://pic.gd/482cfc

No Body
A: 

In our cases, since we have 4 processors, we then increased the "number of worker process to 4" currently working well so far as compare before.

here a snapshot: http://pic.gd/c3661a

No Body
A: 

You can use the application pool "Recycle" option in IIS7+ to configure physical and virtual memory limits for application pools. Once these are reached the process will recycle and the resources will be released. Unfortunately the option to recycle based on CUP usage has been removed from IIS7+ (some one correct me if I'm wrong). If you have other apps on the server and want to avoid them competing for resources when this condition happens you can implement Windows System Resources Manager and it's IIS policy (here is a good tutorial http://learn.iis.net/page.aspx/449/using-wsrm-to-manage-iis-70-apppool-cpu-utilization/)

Note SRWM is only available on Enterprise and Data Center editions.

Bernesto
The latest on this is that we seem to be experiencing much more server load during ASP.Net compilation on W2K8 than we did on W2K3. We're going to deploy a web application (compiled ASP.Net website) to see if that improves things.
Larry Dallas
A: 

Has this been resolved? Can the resolution be shared, please?

cvsayani