JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION structure

Contains information about notification limits for a job object. This structure is used by the SetInformationJobObject and QueryInformationJobObject functions with the JobObjectNotificationLimitInformation information class.

Syntax


typedef struct _JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION {
  DWORD64                                   IoReadBytesLimit;
  DWORD64                                   IoWriteBytesLimit;
  LARGE_INTEGER                             PerJobUserTimeLimit;
  DWORD64                                   JobMemoryLimit;
  JOBOBJECT_RATE_CONTROL_TOLERANCE          RateControlTolerance;
  JOBOBJECT_RATE_CONTROL_TOLERANCE_INTERVAL RateControlToleranceInterval;
  DWORD                                     LimitFlags;
} JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION, *PJOBOBJECT_NOTIFICATION_LIMIT_INFORMATION;

Members

IoReadBytesLimit

If the LimitFlags member specifies JOB_OBJECT_LIMIT_FLAGS_READ_BYTES, this member is the notification limit for total I/O bytes read by all processes in the job. Otherwise, this member is ignored.

IoWriteBytesLimit

If the LimitFlags parameter specifies JOB_OBJECT_LIMIT_FLAGS_WRITE_BYTES, this member is the notification limit for total I/O bytes written by all processes in the job. Otherwise, this member is ignored.

PerJobUserTimeLimit

If the LimitFlags parameter specifies JOB_OBJECT_LIMIT_JOB_TIME, this member is the notification limit for per-job user-mode execution time, in 100-nanosecond ticks. Otherwise, this member is ignored.

The system adds the accumulated execution time of processes associated with the job to this limit when the limit is set. For example, if a process associated with the job has already accumulated 5 minutes of user-mode execution time and the limit is set to 1 minute, the limit actually enforced is 6 minutes.

To specify PerJobUserTimeLimit as an enforceable limit and terminate processes in jobs that exceed the limit, see the JOBOBJECT_BASIC_LIMIT_INFORMATION structure.

JobMemoryLimit

If the LimitFlags parameter specifies JOB_OBJECT_LIMIT_JOB_MEMORY, this member is the notification limit for total virtual memory that can be committed by all processes in the job, in bytes. Otherwise, this member is ignored.

To specify JobMemoryLimit as an enforceable limit and prevent processes in jobs that exceed the limit from continuing to commit memory, see the JOBOBJECT_EXTENDED_LIMIT_INFORMATION structure.

RateControlTolerance

If the LimitFlags parameter specifies JOB_OBJECT_LIMIT_RATE_CONTROL, this member specifies the extent to which a job can exceed its CPU rate control limits during the interval specified by the RateControlToleranceInterval member. Otherwise, this member is ignored. The job must have the JOB_OBJECT_CPU_RATE_CONTROL_NOTIFY option set for a notification to be sent.

This member can be one of the following values. If no value is specified, ToleranceHigh is used.

ValueMeaning
ToleranceLow
1

The job can exceed its CPU rate control limits for 20% of the tolerance interval.

ToleranceMedium
2

The job can exceed its CPU rate control limits for 40% of the tolerance interval.

ToleranceHigh
3

The job can exceed its CPU rate control limits for 60% of the tolerance interval.

 

RateControlToleranceInterval

If the LimitFlags parameter specifies JOB_OBJECT_LIMIT_RATE_CONTROL, this member specifies the interval during which a job's CPU usage is monitored to determine whether the job has exceeded its CPU rate control limits. Otherwise, this member is ignored. The job must have the JOB_OBJECT_CPU_RATE_CONTROL_NOTIFY option set for a notification to be sent.

This member can be one of the following values. If no value is specified, ToleranceIntervalShort is used.

ValueMeaning
ToleranceIntervalShort
1

The tolerance interval is 10 seconds.

ToleranceIntervalMedium
2

The tolerance interval is one minute.

ToleranceIntervalLong
3

The tolerance interval is 10 minutes.

 

LimitFlags

The limit flags that are in effect. This member is a bitfield that determines whether other structure members are used. Any combination of the following values can be specified.

ValueMeaning
JOB_OBJECT_LIMIT_JOB_MEMORY
0x00000200

Establishes the committed memory limit to the job-wide sum of committed memory for all processes associated with the job. The JobMemoryLimit member contains additional information.

JOB_OBJECT_LIMIT_JOB_READ_BYTES
0x00010000

Establishes the I/O read bytes limit to the job-wide sum of I/O bytes read by all processes associated with the job. The IoReadBytesLimit member contains more information.

JOB_OBJECT_LIMIT_JOB_WRITE_BYTES
0x00020000

Establishes the I/O write bytes limit to the job-wide sum of I/O bytes written by all processes associated with the job. The IoWriteBytesLimit member contains more information.

JOB_OBJECT_LIMIT_JOB_TIME
0x00000004

Establishes the limit for user-mode execution time for the job. The PerJobUserTimeLimit member contains additional information.

JOB_OBJECT_LIMIT_RATE_CONTROL
0x00040000

Establishes the notification threshold for the CPU rate control limits established for the job. The RateControlTolerance and RateControlToleranceInterval members contain additional information.

CPU rate control limits are established by calling SetInformationJobObject with the JobObjectCpuRateInformationClass information class.

 

Remarks

When a notification limit is exceeded, the system sends a JOB_OBJECT_MSG_NOTIFICATION_LIMIT message to the I/O completion port associated with the job. Processes in the job continue to run and can continue to allocate memory or transmit read or write bytes beyond the specified limits.

When the application monitoring the I/O completion port receives a JOB_OBJECT_MSG_NOTIFICATION_LIMIT message, it must call QueryInformationJobObject with the JobObjectLimitViolationInformation information class. Limit violation information is received in a JOBOBJECT_LIMIT_VIOLATION_STRUCTURE that contains information about all notification limits that were exceeded at the time of the query. The system will not send another JOB_OBJECT_MSG_NOTIFICATION_LIMIT message until after QueryInformationJobObject is called.

CPU rate control limits for a job are established in a JOBOBJECT_CPU_RATE_CONTROL_INFORMATION structure. The CPU rate control values in the JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION structure specify how much the job can exceed its established CPU rate control limits before notification is sent. CPU rate control notifications are sent only if the JOB_OBJECT_CPU_RATE_CONTROL_NOTIFY option is in effect.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

WinNT.h

See also

QueryInformationJobObject
SetInformationJobObject
JOBOBJECT_CPU_RATE_CONTROL_INFORMATION
JOBOBJECT_LIMIT_VIOLATION_INFORMATION

 

 

Community Additions

ADD
Show:
© 2014 Microsoft