ProcessModelSection.MaxWorkerThreads 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
CLR 스레드 풀의 CPU당 최대 작업자 스레드 양을 나타내는 값을 가져오거나 설정합니다.
public:
property int MaxWorkerThreads { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("maxWorkerThreads", DefaultValue=20)]
[System.Configuration.IntegerValidator(MaxValue=2147483646, MinValue=1)]
public int MaxWorkerThreads { get; set; }
[<System.Configuration.ConfigurationProperty("maxWorkerThreads", DefaultValue=20)>]
[<System.Configuration.IntegerValidator(MaxValue=2147483646, MinValue=1)>]
member this.MaxWorkerThreads : int with get, set
Public Property MaxWorkerThreads As Integer
속성 값
최대 스레드 수입니다. 기본값은 20입니다.
- 특성
예제
다음 코드 예제에서는 속성에 액세스 하는 방법을 보여 있습니다 MaxWorkerThreads .
// Get the current MaxWorkerThreads property value.
int maxWorkerThreads =
processModelSection.MaxWorkerThreads;
// Set the MaxWorkerThreads property to 128.
processModelSection.MaxWorkerThreads = 128;
' Get the current MaxWorkerThreads property value.
Dim maxWorkerThreads As Integer = _
processModelSection.MaxWorkerThreads
' Set the MaxWorkerThreads property to 128.
processModelSection.MaxWorkerThreads = 128
설명
값은 구성 섹션의 MaxWorkerThreads 설정 httpRuntime 과 MinFreeThreads 같거나 커야 합니다.
각각 속성 및 MaxIOThreads 속성을 사용하여 MaxWorkerThreads 작업자 스레드 및 I/O 스레드 수를 설정하여 CPU 사용률을 제어할 수 있습니다.
두 스레드 유형의 차이점은 후자가 스트림 또는 파이프와 같은 I/O 개체에 바인딩되고 전자는 기존의 무제한 스레드라는 것입니다. IIS(인터넷 정보 서비스) 버전 6.0 이상의 경우 ASP.NET 작업자 스레드에서 요청을 처리합니다. 이는 ASP.NET IIS 내에 통합되기 때문입니다.
이러한 스레드는 애플리케이션에 속하는 프로세스 전체 CLR 스레드 풀에서 가져옵니다.
메모
일반적으로 허용되는 스레드의 기본값은 CPU 사용률을 높게 유지하기에 충분합니다. 어떤 이유로 인해 애플리케이션이 느리고 외부 리소스를 기다리는 경우 스레드 수를 100보다 작은 값으로 늘리려고 할 수 있습니다.