R – Significant Performance Decrease when moving from Windows Server 2003 to 2008 (IIS 6 to IIS 7)

iis-6iis-7performancewindows-server-2003windows-server-2008

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.

Best Answer

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?
Related Topic