Share via


ApplicationPoolCpu.SmpProcessorAffinityMask Property

Definition

Gets or sets the CPU affinity for an application pool.

public:
 property long SmpProcessorAffinityMask { long get(); void set(long value); };
public long SmpProcessorAffinityMask { get; set; }
member this.SmpProcessorAffinityMask : int64 with get, set
Public Property SmpProcessorAffinityMask As Long

Property Value

A value that indicates the CPU affinity for the application pool. The default is 4294967295.

Exceptions

The value is less than MinValue or greater than MaxValue.

Examples

The following example gets and displays the value of the SmpProcessorAffinityMask property. This code example is part of a larger example provided for the ApplicationPoolCpu class.

Console.WriteLine("SmpProcessorAffinityMask: " +
    apppool.Cpu.SmpProcessorAffinityMask.ToString());

Remarks

This property configures the hexadecimal processor mask, which indicates to which CPU the worker processes in an application pool are bound. Before this property takes effect, the SmpAffinitized property must be set to true for the current ApplicationPool object.

Note

Do not set this property to 0. Doing so disables SMP affinity and creates an error condition. Processes that are running on one CPU do not remain affiliated with that CPU throughout their lifetimes.

Applies to