Insights

6 IIS Maximum Worker Process Best Practices

If you're running IIS, it's important to know how to set the maximum number of worker processes. Here are six best practices to follow.

The IIS Maximum Worker Process (MWP) setting is an important configuration for web servers running on the Microsoft IIS platform. It determines the maximum number of processes that can be used to serve requests at any given time.

In this article, we will discuss 6 best practices for setting the IIS Maximum Worker Process. We will also discuss how to monitor and adjust the setting to ensure optimal performance. By following these best practices, you can ensure that your web server is running at peak efficiency.

1. Set the MaxProcesses value to a number that is equal to or greater than the total number of logical processors.

When the MaxProcesses value is set to a number that is less than the total number of logical processors, IIS will not be able to take full advantage of all available resources. This can lead to slower performance and decreased scalability. By setting the MaxProcesses value to a number equal to or greater than the total number of logical processors, you ensure that IIS can use all available resources for maximum efficiency.

2. If you set the MaxProcesses value to 0, IIS uses the following formula to calculate the maximum number of worker processes:

The formula is: MaxProcesses = (Number of CPUs * Number of Cores) + 1. This ensures that the maximum number of worker processes will be equal to or greater than the total number of cores available on the server, which helps ensure optimal performance and scalability. Additionally, setting the value to 0 allows IIS to automatically adjust the number of worker processes as needed based on system load.

3. The MaxProcesses value must be between 1 and 20 for 32-bit systems and between 1 and 512 for 64-bit systems.

This value is used to determine the maximum number of worker processes that can be created for an application pool.

It’s important to set this value correctly because too few worker processes can lead to poor performance, while too many can cause memory and CPU issues. The best practice is to start with a low MaxProcesses value and then increase it as needed until you find the optimal setting for your environment.

You should also monitor the performance of your IIS server regularly to ensure that the MaxProcesses value is still appropriate. If you notice any performance degradation or other problems, you may need to adjust the MaxProcesses value accordingly.

4. Do not set the MaxProcesses value to a number that is less than the number of CPUs on your server.

When the MaxProcesses value is set to a number that is less than the number of CPUs on your server, it can cause performance issues. This is because IIS will not be able to take full advantage of all available CPU resources and may become bottlenecked. Additionally, setting the MaxProcesses value too low can also lead to increased memory usage as each process will need more memory in order to handle the same amount of requests.

To ensure optimal performance, make sure you set the MaxProcesses value to at least the number of CPUs on your server. If you have multiple servers with different numbers of CPUs, then you should adjust the MaxProcesses value accordingly.

5. For example, if you have four CPUs on your server, do not set the MaxProcesses value to 2.

When the MaxProcesses value is set to 2, IIS will only use two of your four CPUs. This means that you are not taking full advantage of all of the resources available on your server and could be limiting its performance. By setting the MaxProcesses value to 4 (or higher if necessary), you can ensure that IIS is using all of the available CPU cores and maximizing the performance of your server.

6. By default, the MaxProcesses value is set to 0 in the applicationHost.config file.

This setting allows IIS to automatically adjust the number of worker processes based on the current load.

It is important to note that this value should not be changed unless absolutely necessary, as it can cause performance issues if set too high or too low. If you do need to change the MaxProcesses value, make sure to monitor your server’s performance closely and adjust accordingly.

Previous

10 JWT Token Expiration Best Practices

Back to Insights
Next

10 SCCM Automatic Deployment Rules Best Practices