Win32 API 日本語リファレンス
ホームSystem.JobObjects › JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3

JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3

構造体
サイズx64: 144 バイト / x86: 136 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
MaxIopsLONGLONG8+0+0ジョブに許可する最大IOPS。
MaxBandwidthLONGLONG8+8+8ジョブに許可する最大帯域幅(バイト/秒)。
ReservationIopsLONGLONG8+16+16ジョブに予約する最小IOPS。
VolumeNameLPWSTR8/4+24+24レート制御を適用するボリューム名。NULLで全ボリューム対象。
BaseIoSizeDWORD4+32+28IOPS計算の基準となる基本I/Oサイズ(バイト)。
ControlFlagsJOB_OBJECT_IO_RATE_CONTROL_FLAGS4+36+32レート制御の有効化等を指定するJOB_OBJECT_IO_RATE_CONTROL_FLAGS。
VolumeNameLengthWORD2+40+36VolumeNameのバイト単位長さ。
CriticalReservationIopsLONGLONG8+48+40クリティカルな最小予約IOPS。
ReservationBandwidthLONGLONG8+56+48予約する帯域幅(バイト/秒)。
CriticalReservationBandwidthLONGLONG8+64+56クリティカルな予約帯域幅(バイト/秒)。
MaxTimePercentLONGLONG8+72+64最大I/O時間割合(パーセント×100)。
ReservationTimePercentLONGLONG8+80+72予約I/O時間割合(パーセント×100)。
CriticalReservationTimePercentLONGLONG8+88+80クリティカルな予約I/O時間割合(パーセント×100)。
SoftMaxIopsLONGLONG8+96+88ソフト上限IOPS。超過時に通知のみ行い制限はしない。
SoftMaxBandwidthLONGLONG8+104+96ソフト上限帯域幅(バイト/秒)。
SoftMaxTimePercentLONGLONG8+112+104ソフト上限I/O時間割合(パーセント×100)。
LimitExcessNotifyIopsLONGLONG8+120+112超過通知をトリガーするIOPSしきい値。
LimitExcessNotifyBandwidthLONGLONG8+128+120超過通知をトリガーする帯域幅しきい値(バイト/秒)。
LimitExcessNotifyTimePercentLONGLONG8+136+128超過通知をトリガーするI/O時間割合しきい値(パーセント×100)。

各言語での定義

#include <windows.h>

// JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3  (x64 144 / x86 136 バイト)
typedef struct JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3 {
    LONGLONG MaxIops;
    LONGLONG MaxBandwidth;
    LONGLONG ReservationIops;
    LPWSTR VolumeName;
    DWORD BaseIoSize;
    JOB_OBJECT_IO_RATE_CONTROL_FLAGS ControlFlags;
    WORD VolumeNameLength;
    LONGLONG CriticalReservationIops;
    LONGLONG ReservationBandwidth;
    LONGLONG CriticalReservationBandwidth;
    LONGLONG MaxTimePercent;
    LONGLONG ReservationTimePercent;
    LONGLONG CriticalReservationTimePercent;
    LONGLONG SoftMaxIops;
    LONGLONG SoftMaxBandwidth;
    LONGLONG SoftMaxTimePercent;
    LONGLONG LimitExcessNotifyIops;
    LONGLONG LimitExcessNotifyBandwidth;
    LONGLONG LimitExcessNotifyTimePercent;
} JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3
{
    public long MaxIops;
    public long MaxBandwidth;
    public long ReservationIops;
    public IntPtr VolumeName;
    public uint BaseIoSize;
    public int ControlFlags;
    public ushort VolumeNameLength;
    public long CriticalReservationIops;
    public long ReservationBandwidth;
    public long CriticalReservationBandwidth;
    public long MaxTimePercent;
    public long ReservationTimePercent;
    public long CriticalReservationTimePercent;
    public long SoftMaxIops;
    public long SoftMaxBandwidth;
    public long SoftMaxTimePercent;
    public long LimitExcessNotifyIops;
    public long LimitExcessNotifyBandwidth;
    public long LimitExcessNotifyTimePercent;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3
    Public MaxIops As Long
    Public MaxBandwidth As Long
    Public ReservationIops As Long
    Public VolumeName As IntPtr
    Public BaseIoSize As UInteger
    Public ControlFlags As Integer
    Public VolumeNameLength As UShort
    Public CriticalReservationIops As Long
    Public ReservationBandwidth As Long
    Public CriticalReservationBandwidth As Long
    Public MaxTimePercent As Long
    Public ReservationTimePercent As Long
    Public CriticalReservationTimePercent As Long
    Public SoftMaxIops As Long
    Public SoftMaxBandwidth As Long
    Public SoftMaxTimePercent As Long
    Public LimitExcessNotifyIops As Long
    Public LimitExcessNotifyBandwidth As Long
    Public LimitExcessNotifyTimePercent As Long
End Structure
import ctypes
from ctypes import wintypes

class JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3(ctypes.Structure):
    _fields_ = [
        ("MaxIops", ctypes.c_longlong),
        ("MaxBandwidth", ctypes.c_longlong),
        ("ReservationIops", ctypes.c_longlong),
        ("VolumeName", ctypes.c_void_p),
        ("BaseIoSize", wintypes.DWORD),
        ("ControlFlags", ctypes.c_int),
        ("VolumeNameLength", ctypes.c_ushort),
        ("CriticalReservationIops", ctypes.c_longlong),
        ("ReservationBandwidth", ctypes.c_longlong),
        ("CriticalReservationBandwidth", ctypes.c_longlong),
        ("MaxTimePercent", ctypes.c_longlong),
        ("ReservationTimePercent", ctypes.c_longlong),
        ("CriticalReservationTimePercent", ctypes.c_longlong),
        ("SoftMaxIops", ctypes.c_longlong),
        ("SoftMaxBandwidth", ctypes.c_longlong),
        ("SoftMaxTimePercent", ctypes.c_longlong),
        ("LimitExcessNotifyIops", ctypes.c_longlong),
        ("LimitExcessNotifyBandwidth", ctypes.c_longlong),
        ("LimitExcessNotifyTimePercent", ctypes.c_longlong),
    ]
#[repr(C)]
pub struct JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3 {
    pub MaxIops: i64,
    pub MaxBandwidth: i64,
    pub ReservationIops: i64,
    pub VolumeName: *mut core::ffi::c_void,
    pub BaseIoSize: u32,
    pub ControlFlags: i32,
    pub VolumeNameLength: u16,
    pub CriticalReservationIops: i64,
    pub ReservationBandwidth: i64,
    pub CriticalReservationBandwidth: i64,
    pub MaxTimePercent: i64,
    pub ReservationTimePercent: i64,
    pub CriticalReservationTimePercent: i64,
    pub SoftMaxIops: i64,
    pub SoftMaxBandwidth: i64,
    pub SoftMaxTimePercent: i64,
    pub LimitExcessNotifyIops: i64,
    pub LimitExcessNotifyBandwidth: i64,
    pub LimitExcessNotifyTimePercent: i64,
}
import "golang.org/x/sys/windows"

type JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3 struct {
	MaxIops int64
	MaxBandwidth int64
	ReservationIops int64
	VolumeName uintptr
	BaseIoSize uint32
	ControlFlags int32
	VolumeNameLength uint16
	CriticalReservationIops int64
	ReservationBandwidth int64
	CriticalReservationBandwidth int64
	MaxTimePercent int64
	ReservationTimePercent int64
	CriticalReservationTimePercent int64
	SoftMaxIops int64
	SoftMaxBandwidth int64
	SoftMaxTimePercent int64
	LimitExcessNotifyIops int64
	LimitExcessNotifyBandwidth int64
	LimitExcessNotifyTimePercent int64
}
type
  JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3 = record
    MaxIops: Int64;
    MaxBandwidth: Int64;
    ReservationIops: Int64;
    VolumeName: Pointer;
    BaseIoSize: DWORD;
    ControlFlags: Integer;
    VolumeNameLength: Word;
    CriticalReservationIops: Int64;
    ReservationBandwidth: Int64;
    CriticalReservationBandwidth: Int64;
    MaxTimePercent: Int64;
    ReservationTimePercent: Int64;
    CriticalReservationTimePercent: Int64;
    SoftMaxIops: Int64;
    SoftMaxBandwidth: Int64;
    SoftMaxTimePercent: Int64;
    LimitExcessNotifyIops: Int64;
    LimitExcessNotifyBandwidth: Int64;
    LimitExcessNotifyTimePercent: Int64;
  end;
const JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3 = extern struct {
    MaxIops: i64,
    MaxBandwidth: i64,
    ReservationIops: i64,
    VolumeName: ?*anyopaque,
    BaseIoSize: u32,
    ControlFlags: i32,
    VolumeNameLength: u16,
    CriticalReservationIops: i64,
    ReservationBandwidth: i64,
    CriticalReservationBandwidth: i64,
    MaxTimePercent: i64,
    ReservationTimePercent: i64,
    CriticalReservationTimePercent: i64,
    SoftMaxIops: i64,
    SoftMaxBandwidth: i64,
    SoftMaxTimePercent: i64,
    LimitExcessNotifyIops: i64,
    LimitExcessNotifyBandwidth: i64,
    LimitExcessNotifyTimePercent: i64,
};
type
  JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3 {.bycopy.} = object
    MaxIops: int64
    MaxBandwidth: int64
    ReservationIops: int64
    VolumeName: pointer
    BaseIoSize: uint32
    ControlFlags: int32
    VolumeNameLength: uint16
    CriticalReservationIops: int64
    ReservationBandwidth: int64
    CriticalReservationBandwidth: int64
    MaxTimePercent: int64
    ReservationTimePercent: int64
    CriticalReservationTimePercent: int64
    SoftMaxIops: int64
    SoftMaxBandwidth: int64
    SoftMaxTimePercent: int64
    LimitExcessNotifyIops: int64
    LimitExcessNotifyBandwidth: int64
    LimitExcessNotifyTimePercent: int64
struct JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3
{
    long MaxIops;
    long MaxBandwidth;
    long ReservationIops;
    void* VolumeName;
    uint BaseIoSize;
    int ControlFlags;
    ushort VolumeNameLength;
    long CriticalReservationIops;
    long ReservationBandwidth;
    long CriticalReservationBandwidth;
    long MaxTimePercent;
    long ReservationTimePercent;
    long CriticalReservationTimePercent;
    long SoftMaxIops;
    long SoftMaxBandwidth;
    long SoftMaxTimePercent;
    long LimitExcessNotifyIops;
    long LimitExcessNotifyBandwidth;
    long LimitExcessNotifyTimePercent;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3 サイズ: 136 バイト(x86)
dim st, 34    ; 4byte整数×34(構造体サイズ 136 / 4 切り上げ)
; MaxIops : LONGLONG (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; MaxBandwidth : LONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ReservationIops : LONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; VolumeName : LPWSTR (+24, 4byte)  st.6 = 値  /  値 = st.6   (lpoke/lpeek も可)
; BaseIoSize : DWORD (+28, 4byte)  st.7 = 値  /  値 = st.7   (lpoke/lpeek も可)
; ControlFlags : JOB_OBJECT_IO_RATE_CONTROL_FLAGS (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; VolumeNameLength : WORD (+36, 2byte)  wpoke st,36,値  /  値 = wpeek(st,36)
; CriticalReservationIops : LONGLONG (+40, 8byte)  qpoke st,40,値 / qpeek(st,40)  ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ReservationBandwidth : LONGLONG (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; CriticalReservationBandwidth : LONGLONG (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; MaxTimePercent : LONGLONG (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; ReservationTimePercent : LONGLONG (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; CriticalReservationTimePercent : LONGLONG (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; SoftMaxIops : LONGLONG (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; SoftMaxBandwidth : LONGLONG (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; SoftMaxTimePercent : LONGLONG (+104, 8byte)  qpoke st,104,値 / qpeek(st,104)  ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; LimitExcessNotifyIops : LONGLONG (+112, 8byte)  qpoke st,112,値 / qpeek(st,112)  ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; LimitExcessNotifyBandwidth : LONGLONG (+120, 8byte)  qpoke st,120,値 / qpeek(st,120)  ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; LimitExcessNotifyTimePercent : LONGLONG (+128, 8byte)  qpoke st,128,値 / qpeek(st,128)  ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3 サイズ: 144 バイト(x64)
dim st, 36    ; 4byte整数×36(構造体サイズ 144 / 4 切り上げ)
; MaxIops : LONGLONG (+0, 8byte)  qpoke st,0,値 / qpeek(st,0)  ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; MaxBandwidth : LONGLONG (+8, 8byte)  qpoke st,8,値 / qpeek(st,8)  ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; ReservationIops : LONGLONG (+16, 8byte)  qpoke st,16,値 / qpeek(st,16)  ※IronHSPのみ。3.7/3.8は lpoke st,16,下位 : lpoke st,20,上位
; VolumeName : LPWSTR (+24, 8byte)  qpoke st,24,値 / qpeek(st,24)  ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; BaseIoSize : DWORD (+32, 4byte)  st.8 = 値  /  値 = st.8   (lpoke/lpeek も可)
; ControlFlags : JOB_OBJECT_IO_RATE_CONTROL_FLAGS (+36, 4byte)  st.9 = 値  /  値 = st.9   (lpoke/lpeek も可)
; VolumeNameLength : WORD (+40, 2byte)  wpoke st,40,値  /  値 = wpeek(st,40)
; CriticalReservationIops : LONGLONG (+48, 8byte)  qpoke st,48,値 / qpeek(st,48)  ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ReservationBandwidth : LONGLONG (+56, 8byte)  qpoke st,56,値 / qpeek(st,56)  ※IronHSPのみ。3.7/3.8は lpoke st,56,下位 : lpoke st,60,上位
; CriticalReservationBandwidth : LONGLONG (+64, 8byte)  qpoke st,64,値 / qpeek(st,64)  ※IronHSPのみ。3.7/3.8は lpoke st,64,下位 : lpoke st,68,上位
; MaxTimePercent : LONGLONG (+72, 8byte)  qpoke st,72,値 / qpeek(st,72)  ※IronHSPのみ。3.7/3.8は lpoke st,72,下位 : lpoke st,76,上位
; ReservationTimePercent : LONGLONG (+80, 8byte)  qpoke st,80,値 / qpeek(st,80)  ※IronHSPのみ。3.7/3.8は lpoke st,80,下位 : lpoke st,84,上位
; CriticalReservationTimePercent : LONGLONG (+88, 8byte)  qpoke st,88,値 / qpeek(st,88)  ※IronHSPのみ。3.7/3.8は lpoke st,88,下位 : lpoke st,92,上位
; SoftMaxIops : LONGLONG (+96, 8byte)  qpoke st,96,値 / qpeek(st,96)  ※IronHSPのみ。3.7/3.8は lpoke st,96,下位 : lpoke st,100,上位
; SoftMaxBandwidth : LONGLONG (+104, 8byte)  qpoke st,104,値 / qpeek(st,104)  ※IronHSPのみ。3.7/3.8は lpoke st,104,下位 : lpoke st,108,上位
; SoftMaxTimePercent : LONGLONG (+112, 8byte)  qpoke st,112,値 / qpeek(st,112)  ※IronHSPのみ。3.7/3.8は lpoke st,112,下位 : lpoke st,116,上位
; LimitExcessNotifyIops : LONGLONG (+120, 8byte)  qpoke st,120,値 / qpeek(st,120)  ※IronHSPのみ。3.7/3.8は lpoke st,120,下位 : lpoke st,124,上位
; LimitExcessNotifyBandwidth : LONGLONG (+128, 8byte)  qpoke st,128,値 / qpeek(st,128)  ※IronHSPのみ。3.7/3.8は lpoke st,128,下位 : lpoke st,132,上位
; LimitExcessNotifyTimePercent : LONGLONG (+136, 8byte)  qpoke st,136,値 / qpeek(st,136)  ※IronHSPのみ。3.7/3.8は lpoke st,136,下位 : lpoke st,140,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3
    #field int64 MaxIops
    #field int64 MaxBandwidth
    #field int64 ReservationIops
    #field intptr VolumeName
    #field int BaseIoSize
    #field int ControlFlags
    #field short VolumeNameLength
    #field int64 CriticalReservationIops
    #field int64 ReservationBandwidth
    #field int64 CriticalReservationBandwidth
    #field int64 MaxTimePercent
    #field int64 ReservationTimePercent
    #field int64 CriticalReservationTimePercent
    #field int64 SoftMaxIops
    #field int64 SoftMaxBandwidth
    #field int64 SoftMaxTimePercent
    #field int64 LimitExcessNotifyIops
    #field int64 LimitExcessNotifyBandwidth
    #field int64 LimitExcessNotifyTimePercent
#endstruct

stdim st, JOBOBJECT_IO_RATE_CONTROL_INFORMATION_NATIVE_V3        ; NSTRUCT 変数を確保
st->MaxIops = 100
mes "MaxIops=" + st->MaxIops