How to use all processor groups in IIS

Alessandro 15 Reputation points
2023-11-06T08:34:51.69+00:00

Hi to all

We have a .NET Framework application which is running into the IIS. We are doing some heavy calculation on the server. The calculation starts in parallel and we are trying to use the full capacity of the server.

In a environment with 2 processor groups with 8 NUMA nodes where in total we have 128 logical processor the IIS Worker process using only half of the power:

User's image

How can we define or configure our application to use more than 64-Core?

We were testing with a Windows Server 2019 and IIS version 10.0.17763.1

Thank you for the help

Internet Information Services
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,970 questions
Windows Server
Windows Server
A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.
13,352 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Yurong Dai-MSFT 2,831 Reputation points Microsoft Vendor
    2023-11-07T04:30:29.0766667+00:00

    Hi @Alessandro,

    By default, IIS application pools may not utilize all available resources. You can adjust application pool settings to increase the number of worker processes to better utilize CPU cores. To do this, follow these steps:

    • Open IIS Manager.
    • Select your application pool.
    • Click Advanced Settings.
    • In the Process Model section, adjust the value for Maximum worker processes.

    The following will discuss 5 best practices for setting the IIS Maximum Worker Process and how to monitor and adjust settings 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 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 fully utilize all available resources. This can result in reduced performance and 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 is equal to or greater than the total number of cores available on the server, which helps ensure optimal performance and scalability. Additionally, setting this 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 the application pool. It's important to set this value correctly because too few worker processes can cause poor performance, and too many can cause memory and CPU issues. The best practice is to start with a lower MaxProcesses value and increase it as needed until you find the best setting for your environment.

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

    When the MaxProcesses value is set to a number that is less than the number of CPUs on the server, it can cause performance issues. This is because IIS will not be able to fully utilize all available CPU resources and bottlenecks may occur. Additionally, setting the MaxProcesses value too low can cause increased memory usage because each process requires more memory to handle the same number of requests.

    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 the four CPUs. This means you are not fully utilizing all available resources on the server and may be limiting its performance. By setting the MaxProcesses value to 4 (or higher, if necessary), you can ensure that IIS uses all available CPU cores and maximizes the performance of the server.

    Finally, if you do need to change the MaxProcesses value, regularly monitor the performance of your IIS server to ensure that the MaxProcesses value remains appropriate. If you notice any performance degradation or other issues, you may need to adjust the MaxProcesses value accordingly.


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the email notification for this thread.

    Best regards,

    Yurong Dai


  2. VANUM Ramana 0 Reputation points
    2024-01-17T09:30:55.04+00:00

    What is the impact of processing the big files from fileservers if not properly set the worker processes value?

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.