Export (0) Print
Expand All

ProcessModelSection.MaxIOThreads Property

Gets or sets a value indicating the maximum number of I/O threads per CPU in the CLR thread pool.

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

'Declaration
<IntegerValidatorAttribute(MinValue := , MaxValue := )> _
<ConfigurationPropertyAttribute("maxIoThreads", DefaultValue := )> _
Public Property MaxIOThreads As Integer

Property Value

Type: System.Int32
The maximum number of threads. The default is 20.

The value of MaxIOThreads must be equal to or greater than the MinFreeThreads setting in the httpRuntime configuration section.

You can have some control over the CPU utilization by setting the number of worker threads and I/O threads, using the MaxWorkerThreads property and the MaxIOThreads property respectively.

The difference between the two types of threads is that the latter are bound to I/O objects, such as a stream or a pipe, and the former are traditional unrestricted threads. For Internet Information Services (IIS) version 6.0 and later, ASP.NET processes requests on worker threads. This is because ASP.NET is integrated within IIS.

These threads are obtained from the process-wide CLR thread pool belonging to an application.

NoteNote

Usually the default values for the allowed threads are sufficient to keep the CPU utilization high. If for some reason your application is slow, perhaps waiting for external resources, you could try to increase the number of threads to a value less than 100.

The following code example shows how to access the MaxIOThreads property.

' Get the current MaxIOThreads property value. 
   Dim maxIOThreads As Integer = _
   processModelSection.MaxIOThreads

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft