IIS maximum number of worker processes

Source: Internet
Author: User
Tags cpu usage server memory

IIS maximum number of worker processes

IIS 6.0 allows the application pool to be configured as a 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 Web site running the same application, and if IIS 5.0 can automatically follow a circular loop pattern to send requests sequentially to these functionally equivalent, In fact, separate Web sites, separating the load into three different processes, can form a small Web farm-the Web garden.

In the Web garden of IIS 6.0, we do not have to create additional Web sites, as long as you specify the number of worker processes to use for an application pool. The specific configuration steps are to open the Properties dialog box for the application pool, go to the Performance page, and enter the number of processes in the maximum worker processes input box under Web Garden, Viii. When the server load is small and no additional worker processes are required, IIS 6.0 automatically shrinks the actual number of worker processes after a certain amount of time (the default is 20 minutes, configurable), and if the load becomes larger, additional worker processes are required, and IIS 6.0 increases the number of worker processes again. All of this is done automatically and does not require administrator intervention.

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

IIS maximum number of worker processes


Each worker process consumes system resources and CPU usage, and too many worker 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 Web Garden, which allows you to configure an application pool to use multiple worker processes. When does IIS create additional worker processes? What knowledge do we need to know before we implement the Web park?

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, not a worker process, which can improve scalability. This feature, called Web Park, is a small "Web farm". Instead of having to use multiple computers to deliver the same content (Web farm), you can use multiple processes on a single computer to deliver the same content.

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

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

While it is useful to use the Web garden in some cases, it is important to note that the session information is unique for each worker process. Because requests are routed in a circular manner to the application pool worker process, the Web garden may not be very useful for the applications that the session information stores in the process. In a few cases, having multiple worker processes running the same application can cause resource contention. For example, if all worker processes are trying to log information to a journal file, or if they are using resources that are not dedicated to multiple concurrent accesses, there is a risk of resource contention.

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

IIS 6.0 allows application pools to be configured as a Web garden

Find the application pool to which the site belongs, right-click Advanced settings, process model, maximum number of worker processes, default 1

If this value is greater than 1, a number of new worker process instances are started when there is a connection request, the maximum number of processes that can be started, and more requests will be sent to the worker process in a round-robin manner, each of which can assume a load of some connection requests. Of course, the cost of CPU and other hardware, it is worthwhile, if the Web server CPU utilization is very low but also need to more efficient processing of concurrent connection requests, why not do so?

If the site uses the dependent process of the session and cache objects, it can not be saved in the server memory, the storage mode of StateServer or SQL Server will be better, and many other worker processes will have context replication when switching, which is also a resource consumption more places

Setting the maximum number of worker processes: (copy) determines the maximum number of worker processes for an application pool by the principle that each worker process can host 30 concurrency. Also note that each worker process will occupy about 200M of system memory, when setting the maximum number of working processes, the main maximum number of working processes and 200M do not exceed the maximum available memory of the system. In general, it is recommended that the maximum number of working processes be adjusted by the number of 5 work processes each time, after adjusting to the website for a period of time, such as still unable to meet the requirements, and then continue to increase the number of 5 work processes.

Assuming that the maximum number of connections is set to 100,1000 a concurrent connection request comes up, first 900 is returned directly to the customer "HTTP Error 503." The service is unavailable. "

Then IIS starts first (assuming the maximum number of concurrent worker threads is 10) for 10 threads to process the request, and the other 90 into the queued state, if the following actions are done:

Locate the application pool to which the site belongs, right-click Advanced Settings, general, queue length, set to 20

So what does the situation look like? Only 20 will enter the queue, and 70 (90-20) requests will return "HTTP Error 503" immediately. The service is unavailable "

The IIS default queue length setting is 1000, and the range is between 10-65535

IIS maximum number of worker processes

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.