Web garden Maximum number of worker processes for IIS 6.0 _win server

Source: Internet
Author: User
Tags configuration settings numeric value sesion cpu usage

IIS 6.0 allows the application pool to be configured as a Web garden (Web Garden). To understand the concept of a Web garden, imagine a scenario where you have an IIS 5.0 server and three Web sites, each running the same application, and if IIS 5.0 is able to automatically send requests sequentially in a circular circular mode to these features equivalent, In fact, a separate Web site, which separates the load into three different processes, can form a small Web farm (Web Farm)--This is the Web garden.

In the Web garden of IIS 6.0, we do not have to create additional Web sites, as long as we specify the number of worker processes for an application pool. The specific configuration step is to open the Properties dialog box for the application pool, go to the Performance page, and enter the number of processes in the maximum number of worker processes input box under Web Garden, as shown in Figure eight. IIS 6.0 automatically shrinks the actual number of worker processes after a certain amount of time (default 20 minutes, configurable) when the server's load is small and no additional worker processes are required, and IIS 6.0 increases the number of worker processes again if the load becomes large and requires additional worker processes. All of this is done automatically without the need for administrator intervention.

Web garden: In a Web garden You can configure the maximum number of worker processes used by this application pool, the default is 1, the maximum can be set to 4000000, and the configuration using multiple worker processes can increase the performance of the application pool processing requests, but before you set up to use more than one worker process, consider the following two points:

Each worker process consumes system resources and CPU usage, and too much work processes can lead to a sharp depletion of system resources and CPU utilization;

Each worker process has its own state data, and if the Web application relies on the worker process to save state data, it may not support the use of multiple worker processes.


Q: IIS 6.0 has a new feature called a Web garden that allows you to configure the application pool to use multiple worker processes. When does IIS create an additional worker process? What knowledge should we know before we implement a Web garden?

A. When you create an application pool, IIS 6 is notified to create a worker process to transfer the contents of the Web sites, files, and folders that are assigned to the application pool. You can configure the application pool to start multiple rather than one worker process, which can improve scalability. This feature, called the Web garden, is a small "Web farm." Instead of using multiple computers to transfer the same content (Web farm), you can use multiple processes on one computer to deliver the same content.

When you configure an IIS 6 application as a Web garden, you only need to set the number of worker processes greater than 1 in the maximum number of worker processes box on the Performance tab of the application pool properties. If this value is greater than 1, each request starts a new worker process instance, and the maximum number of processes that can be started are the number of worker processes you specify. Subsequent requests are sent to the worker process in a circular fashion.

Web gardens are useful in situations where your application resources are limited. For example, if your connection to a database is slow, you can increase the number of connections to the database by using multiple worker processes to increase user throughput.

Although it is useful to use a Web garden in some cases, it is important to note that the session information for each worker process is unique. Because requests are routed to the application pool worker process in a circular fashion, the Web garden may have little effect on the application that the session information stores in the process. In rare cases, having multiple worker processes running the same application can result in resource competition. For example, if all worker processes attempt to record information to a log file or use resources that are not dedicated to multiple concurrent accesses, there may be a resource contention problem.

If these problems do not exist, then the Web garden may be one of the features you need, and it will work very well.

Testing if setting up a Web garden too much can cause the background to not log in

ASP is temporarily unable to share the session, through Cookies,asp.net has resolved the problem can refer to the following settings.

The maximum working process setting for the Web garden of the IIS Web site causes session failure, and when the number of processes is greater than 1,session, the solution
Session is stored in the process, so, Web garden is greater than 1 o'clock, there are two processes, can not save each other session, so failed!
Set the sesion to be saved in the server, it can be solved!

Sesion set to save on server: ASP.net configuration settings-> State Management-> session state setting to StateServer.

IIS6.0 Web Garden Configuration

Create a Web garden for an application pool note the following points:

One, each work process consumes system resources and CPU occupancy rate, too much work process can cause the system resources and CPU utilization sharp consumption;
Each worker process has its own state data, and if the Web application relies on the worker process to save state data, the use of multiple worker processes may not be supported.
Competition for resources, allowing multiple worker processes to run the same application can result in resource competition
Creating a Web garden for an application pool enhances performance in the following ways:

A reliable request processing: When a worker process in an application pool stops processing (for example, when the script engine stops responding), other worker processes can accept and process requests for that application pool.
Second, reduce resource contention: When the Web garden reaches a stable state, each new TCP/IP connection will be assigned to a worker process in the Web garden according to the cycle scheme.

This can result in balancing workloads and reducing resource contention for binding to worker processes.
Configuring a Web garden using IIS Manager

First, in IIS Manager, expand the local computer and the application pool in turn, right-click the application pool, and then click Properties.
Second, click the Performance tab, and then under Web Garden, in the maximum number of worker processes box, type the number of worker processes you want to specify to the application pool. (to form a Web garden, you must type a numeric value greater than 1 for the application pool.)
Third, click OK.
Alternatively, you can configure the Web garden by setting the metabase properties maxprocesses.     The Maxprocesses property determines the maximum number of worker processes that the application pool is allowed to service on its request. A value of 0 indicates that there is no managed application pool for which the worker process provides services.
The default value for the Maxprocesses property is 1, which is the default number of worker processes that serve the application pool. To configure the application pool as a Web garden, set the Maxprocesses property to a value greater than 1.

Using Adsutil.vbs to configure a Web garden

First, in the Run dialog box, type cmd, and then click OK.
Second, at the command prompt, type:

Copy Code code as follows:

cscript%SystemDrive%\inetpub\adminscripts\adsutil.vbs set w3svc/apppools/applicationpoolname/maxprocesses n

Replace n with the number of worker processes to be serviced for the application pool.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.