次の方法で共有


ProcessModelSection.MaxIOThreads プロパティ

定義

CLR スレッド プールにおける CPU あたりの I/O スレッド数の上限を示す値を取得または設定します。

public:
 property int MaxIOThreads { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("maxIoThreads", DefaultValue=20)]
[System.Configuration.IntegerValidator(MaxValue=2147483646, MinValue=1)]
public int MaxIOThreads { get; set; }
[<System.Configuration.ConfigurationProperty("maxIoThreads", DefaultValue=20)>]
[<System.Configuration.IntegerValidator(MaxValue=2147483646, MinValue=1)>]
member this.MaxIOThreads : int with get, set
Public Property MaxIOThreads As Integer

プロパティ値

Int32

スレッド数の上限。 既定値は 20 です。

属性

MaxIOThreads プロパティへのアクセス方法を次のコード例に示します。


 // Get the current MaxIOThreads property value.
int maxIOThreads = 
    processModelSection.MaxIOThreads;

 // Set the MaxIOThreads property to 64.
 processModelSection.MaxIOThreads = 64;
' Get the current MaxIOThreads property value.
   Dim maxIOThreads As Integer = _
   processModelSection.MaxIOThreads

' Set the MaxIOThreads property to 64.
processModelSection.MaxIOThreads = 64

注釈

値は、構成セクションのMaxIOThreadshttpRuntime設定以上MinFreeThreadsである必要があります。

ワーカー スレッドと I/O スレッドの数を設定し、それぞれプロパティとプロパティMaxIOThreadsを使用して、CPU 使用率をMaxWorkerThreads制御できます。

2 種類のスレッドの違いは、後者がストリームやパイプなどの I/O オブジェクトにバインドされ、前者が従来の無制限スレッドである点です。 インターネット インフォメーション サービス (IIS) バージョン 6.0 以降の場合、ASP.NET はワーカー スレッドの要求を処理します。 これは、ASP.NET が IIS 内に統合されているためです。

これらのスレッドは、アプリケーションに属するプロセス全体の CLR スレッド プールから取得されます。

注意

通常、許可されるスレッドの既定値は、CPU 使用率を高く保つために十分です。 何らかの理由でアプリケーションが低速で、外部リソースを待機している場合は、スレッドの数を 100 未満の値に増やすことができます。

適用対象

こちらもご覧ください