ThreadPool SetMinThreads - Installation Impact

I am trying to understand the effect of the installation ThreadPool.SetMinthreads. I have several virtual applications running in the same Azure application service. I understand that all these virtual applications will share the Application Pool and will have only one workflow (Assuming the App Maximum max workflow is 1).

I have two questions.

  1. In this setup, if I set ThreadPool.SetMinThreadsto say 100 worker threads and I / O threads, can I confidently assume that each application domain will have 100 worker threads and 100 I / O threads when it loads? To be precise, is ThreadPool.SetMinThreads used in the AppDomain or Worker Process or App Pool? What is the scope of ThreadPool?
  2. I also assume that there are no restrictions on the maximum flows that the system can generate, since it is determined by the main bandwidth. This means that if I do not explicitly set ThreadPool.SetMaxThreads, the system will spawn new threads and will continue to do so if there is a continuous load to the maximum CPU / Memory to the maximum. I am based on the following statement to support my assumption:

A process and threads, for example, require physical memory, virtual memory, and pool memory, so the number of processes or threads that can be created on a given Windows system is ultimately determined by one of these resources, depending on how the processes or threads are created and what restriction comes first. https://blogs.technet.microsoft.com/markrussinovich/2009/07/05/pushing-the-limits-of-windows-processes-and-threads/

+9
source share
1 answer

MinThreads determines how many workflows will be created without delay.

Whenever you do something that requires a thread from a thread pool (whether it be a worker or an IOCP pool), the system will first see if there is a free thread.

, , . , MinThreads, . , 300-500 , . - , .

, MaxThreads.

, , IIS , , ; , . , , , . , .

... MinThreads 100 , , ,

+7

Source: https://habr.com/ru/post/1687824/


All Articles