JobIoRateLimits Class

Defines I/O rate limits for a job object.

public sealed class JobIoRateLimits

Example

using var job = new JobObject();
var limits = new JobIoRateLimits
{
    ControlFlags = JobIoRateFlags.Enable,
    MaxBandwidth = 1024 * 1024, // 1 MB/s
    MaxIops = 1000,
};
job.SetIoLimits(limits);

Constructors

NameDescription
JobIoRateLimits()

JobIoRateLimits()

public JobIoRateLimits()

No documentation is available.

Properties

NameDescription
BaseIoSizeThe base size of the normalized I/O unit, in bytes. For example, if the BaseIoSize member is 8,000, every 8,000 bytes counts as one I/O unit. 4,000 bytes is also one I/O unit in this example, while 8,001 bytes is two I/O units. You can set the value of this base I/O size by using the StorageBaseIOSize value of the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\QoS registry key. The value of the BaseIoSize member is subject to the following constraints: Read more on docs.microsoft.com.
ControlFlagsThe policy for control of the I/O rate. This member can be one of the following values.
MaxBandwidthThe maximum limit for the I/O rate in bytes per second. Set to 0 to specify no limit. When you set both MaxBandwith and MaxIops, the operating system enforces the first limit that the I/O rate reaches. Read more on docs.microsoft.com.
MaxIopsThe maximum limit for the I/O rate in I/O operations per second (IOPS). Set to 0 if to specify no limit. When you set both MaxIops and MaxBandwith, the operating system enforces the first limit that the I/O rate reaches. Read more on docs.microsoft.com.
ReservationIopsSets a minimum I/O rate which the operating system reserves for the job. To make no reservation for the job, set this value to 0. The operating system allows the job to perform I/O operations at this rate, if possible. If the sum of the minimum rates for all jobs exceeds the capacity of the operating system, the rate at which the operating system allows each job to perform I/O operations is proportional to the reservation for the job. Read more on docs.microsoft.com.
VolumeNameThe NT device name for the volume to which you want to apply the policy for the I/O rate. For information about NT device names, see NT Device Names. If this member is NULL, the policy for the I/O rate applies to all of the volumes for the operating system. For example, if this member is NULL and the MaxIops member is 100, the maximum limit for the I/O rate for each volume is set to 100 IOPS, instead of setting an aggregate limit for the I/O rate across all volumes of 100 IOPS. Read more on docs.microsoft.com.

The base size of the normalized I/O unit, in bytes. For example, if the BaseIoSize member is 8,000, every 8,000 bytes counts as one I/O unit. 4,000 bytes is also one I/O unit in this example, while 8,001 bytes is two I/O units. You can set the value of this base I/O size by using the StorageBaseIOSize value of the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\QoS registry key. The value of the BaseIoSize member is subject to the following constraints:

Read more on docs.microsoft.com.

public uint BaseIoSize { get; set; }

Property value

uint

ControlFlags

JobIoRateLimits.cs

The policy for control of the I/O rate. This member can be one of the following values.

public JobIoRateFlags ControlFlags { get; set; }

Property value

JobIoRateFlags

MaxBandwidth

JobIoRateLimits.cs

The maximum limit for the I/O rate in bytes per second. Set to 0 to specify no limit. When you set both MaxBandwith and MaxIops, the operating system enforces the first limit that the I/O rate reaches.

Read more on docs.microsoft.com.

public long MaxBandwidth { get; set; }

Property value

long

The maximum limit for the I/O rate in I/O operations per second (IOPS). Set to 0 if to specify no limit. When you set both MaxIops and MaxBandwith, the operating system enforces the first limit that the I/O rate reaches.

Read more on docs.microsoft.com.

public long MaxIops { get; set; }

Property value

long

ReservationIops

JobIoRateLimits.cs

Sets a minimum I/O rate which the operating system reserves for the job. To make no reservation for the job, set this value to 0. The operating system allows the job to perform I/O operations at this rate, if possible. If the sum of the minimum rates for all jobs exceeds the capacity of the operating system, the rate at which the operating system allows each job to perform I/O operations is proportional to the reservation for the job.

Read more on docs.microsoft.com.

public long ReservationIops { get; set; }

Property value

long

The NT device name for the volume to which you want to apply the policy for the I/O rate. For information about NT device names, see NT Device Names. If this member is NULL, the policy for the I/O rate applies to all of the volumes for the operating system. For example, if this member is NULL and the MaxIops member is 100, the maximum limit for the I/O rate for each volume is set to 100 IOPS, instead of setting an aggregate limit for the I/O rate across all volumes of 100 IOPS.

Read more on docs.microsoft.com.

public string? VolumeName { get; set; }

Property value

string?