Fix an ASP.NET performance problem in your Windows 2000 server

The .NET Framework is supposed to speed the development and deployment of business solutions. A bug in ASP.NET can have the opposite effect on a Windows 2000 server, slowing everything down. Scott Lowe explains how to fix the problem.

You’ve probably heard the buzz Microsoft has been generating about .NET. Microsoft is making the move to .NET services to increase speed and productivity in producing business solutions. Paradoxically, when you use ASP.NET hosted on a Windows 2000 server, a bug in ASP.NET can cause your Windows 2000 server to slow down. In this Daily Feature, I'll go over a specific problem relating to the .NET Framework. I'll show you how to determine if you're affected, and what you can do about it.

Performance degradation
One specific problem with ASP.NET running under Windows 2000 Server (prior to its being fixed in the .NET Framework Service Pack 2) is a performance hit when a client loads a page that includes a lot of client-side scripting.

Performance can suffer under certain circumstances in which multiple responses are sent to the client because of the way that the messages containing these responses are constructed. In cases where the total size of the buffers containing the data is more than 32 KB, the buffers are sent back to the client one at a time in separate messages, even if an individual buffer is only 1 or 2 KB in size.

If you're running ASP.NET under the .NET Framework without Service Pack 2, and you’re experiencing slower-than-expected response to client requests, you may be suffering from this problem. Luckily, the fix is as simple as installing Service Pack 2 for the .NET Framework. However, in order to be certain you're fixing the right problem, you should examine a specific performance counter prior to upgrading and immediately after upgrading, and compare the values.

The counter to monitor is the Request Execution Time counter for ASP.NET. The value for this counter should significantly decrease after the upgrade to Service Pack 2.

Efficiency is the answer
Rather than sending each individual buffer as a separate message, the fix fills up messages of 32 KB in size with as many buffers as it can fully hold. This means that if you have four 16-KB buffers totaling 64 KB, the responses will be sent to the client in two 32-KB messages. Keep in mind that this particular fix only affects pages that have more than 32 KB in responses.

Getting the fix
Don’t confuse .NET Framework Service Pack 2 with the Service Packs for Windows 2000 itself. The fix for this problem is contained in the .NET Framework Service Pack, not the one in Windows 2000.

Before downloading the latest .NET Framework Service Pack, you should check the version that you're already running. In Windows 2000 Server, you can do so from the Microsoft Management Console (MMC). Start the MMC by choosing Start | Run and typing mmc in the run box.

When the MMC launches, click Console | Add/Remove Snap-In. When the Add/Remove Snap-In window appears, click Add. Select .NET Framework Configuration from the list. Next click Add, and then click Close. In the Add/Remove Snap-In dialog box, select the .NET Configuration option and click the About button.

If the .NET Framework is version 1.0.3705.0, it’s the Framework without any Service Packs. As of this writing, the .NET Framework is supported by Service Pack 2, available for download from Microsoft. Service Pack 2 is only 5.9 MB in size, so it won’t take long to download.

To download and install .NET Framework Service Pack 2, follow the instructions on the download page. Once it's downloaded and installed, you should see a version of 1.0.3705.288 or later in the .NET Framework MMC console.

Pump up ASP.NET performance
Although Windows 2000’s ASP.NET performance problem isn’t new, it underscores the importance of keeping a watchful eye on Service Pack releases and system baseline performance statistics. Neglecting either of these could cause you to miss problems that end up costing your organization a lot of money: additional hardware costs, lost performance, and a poor return on your IT investment.


Editor's Picks

Free Newsletters, In your Inbox