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

プロパティ値

スレッドの最大数。 既定値は 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

注釈

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

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

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

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

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

適用対象

こちらもご覧ください