Job object CPU rate control HARD_CAP: scheduling interval length and how to observe interval boundaries

Alexander Vardi 0 Reputation points
2026-11-20T23:03:17.1633333+00:00

I am trying to verify, with evidence, that a job object configured with JOB_OBJECT_CPU_RATE_CONTROL_ENABLE | JOB_OBJECT_CPU_RATE_CONTROL_HARD_CAP and CpuRate = 2500 never uses more than 25% of processor cycles in any scheduling interval. The job has no parent job. The workload is a single CPU-bound thread on a 2-processor system (Windows 11 build 26300, running as a Hyper-V guest).

The JOBOBJECT_CPU_RATE_CONTROL_INFORMATION page states that after the job reaches its CPU cycle limit "for the current scheduling interval, no threads associated with the job will run until the next interval". I could not find the following in the documentation:

  1. Interval length: What is the length of this scheduling interval? Is it fixed, configurable, or dependent on timer resolution, processor count, or other factors?
  2. Interval boundaries: Is there any supported way (ETW provider/event, job notification, or API) to observe, for a specific job, when a scheduling interval starts and ends, or when the job's cycle budget is exhausted and replenished? The CPU rate notifications in JOBOBJECT_NOTIFICATION_LIMIT_INFORMATION_2 appear to cover only the 10 s / 1 min / 10 min tolerance interval, not the scheduling interval.
  3. Wait reason: In kernel CSwitch events, does the wait reason WrCpuRateControl mean specifically that the thread was blocked because its job's CPU rate control budget was exhausted? Is the release of such threads aligned with the start of the next scheduling interval?
  4. Cycle accounting: Since the cap is defined in processor cycles, what is the recommended way to measure a job's consumed cycles per scheduling interval and the total cycles available in that interval? For example, is ETW PMC collection on CSwitch events (TracePmcEventListInfo / TracePmcCounterListInfo) a supported basis for this? If so, are EVENT_HEADER_EXT_TYPE_PMC_COUNTERS values per-processor cumulative counters?
  5. Virtualization: In a Hyper-V guest, is the scheduling interval based on guest time, and can time when the virtual processor is not running affect how the cap is enforced or measured?

A reference to official documentation would be appreciated. I am not asking for a tolerance or workaround, only for the documented behavior and a supported way to observe it.

Windows development | Windows API - Win32
0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.