Ask the Expert

What causes ASP.NET server performance to degrade as sessions age?

I'm running ASP.NET 1.1 on a Windows 2000 server, my application is written in VB.NET, and I have SQL Server 2000 on another box. The ASP.NET application has very large pages with very complex data-filled controls, but it is only used on an intranet by a small number of people. When users initially log in, it performs well -- it takes about one or two seconds to load a page or postback. After an hour or two, identical postbacks take longer to respond; it starts to take almost a minute. If users log off and then on again (which creates new sessions), performance returns instantly. The DB server utilization is minimal, but I see the ASP.NET worker process activity progresses from minimal to massive as user sessions age. My question is: What is causing ASP.NET server performance to degrade as sessions age?

Requires Free Membership to View

This is tough to troubleshoot without having access to the application itself and peeking under the hood. It sounds like this is an application that end users keep open throughout the course of the day, but it is a small number of users. Have you thought about perhaps distributing the load (see below)? How are you applying your session state? Feel free to respond.

Web gardens
Web gardens are designed to help alleviate the effect of an application that has serious software contention issues without needing an application redevelopment exercise. The approach is relatively simple: A Web garden alleviates the contention on a resource by indirectly creating multiple instances of the resource and evenly distributing the load throughout them. The creating of a new instance is controlled through the application pool configuration.

To create a Web garden, you set the number of worker processes property in the application pool configuration. The default number of worker processes for each application pool is one. By changing that default, you create a Web garden with however many worker processes you select. IIS then distributes the load to the specific instances of the application. In a Web garden, the requests for a specific TCP/IP connection are all sent to one worker process, but every new connection is sent to the next worker process in a round robin fashion. This has the effect of localizing workload related to a specific client, but spreading out the workload across all of the worker processes of the Web garden. By spreading out the workload, you also alleviate some of the contention on the shared resources.

Using a Web garden consisting of four worker processes, the following pattern would be achieved:

|•|Requests from connection 1 go to    |
| |Worker Process 1                    |
|•|Requests from connection 2 go to    |
| |Worker Process 2                    |
|•|Requests from connection 3 go to    |
| |Worker Process 3                    |
|•|Requests from connection 4 go to    |
| |Worker Process 4                    |
|•|Requests from connection 5 go to    |
| |Worker Process 1                    |
This pattern is represented in Figure 5:

This was first published in September 2005

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: