mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-17 10:09:05 +02:00
Co-authored-by: Claude <noreply@anthropic.com> Signed-off-by: Claude <noreply@anthropic.com>
1.7 KiB
1.7 KiB
iis collector
- The
Web ServiceandWeb Service Cacheobjects are served by the perflib V1 providerw3ctrs.dll, which reads a counter snapshot that W3SVC writes to shared memory. When the snapshot is older thanFreshTimeForCounters(default 15 s), the provider signals W3SVC, callsSleepforCheckCountersEveryNMiliseconds(default 250 ms) and checks the snapshot again, up toNumberOfTimesToCheckCounters(default 4) times. The defaults are built into the DLL; nonzeroREG_DWORDvalues belowHKLM\SYSTEM\CurrentControlSet\Services\W3SVC\Performanceoverride them. Microsoft does not document these values. - So a scrape that hits a stale snapshot waits 250 ms, up to 4 × 250 ms,
inside
PdhCollectQueryDataof theWeb Servicequery. Go execution traces from a production server showed 259 to 261 ms there, and PDH reads ofsystem,logical_diskandnetthat started at the same moment blocked for the same time.cpu,memoryand the other IIS objects, includingWeb Service Cache, were never slow, and there were no IIS event log entries. The exact lock inside Windows that makes the other reads wait is not known (#2698). - This is Windows behavior, not an exporter lock or timeout. Don't look for an
exporter-side cause of flat ~250 ms
iisdurations, and don't add workarounds that hide them. A repro on a GitHub runner with IIS did not show it in 40 minutes, so don't expect to reproduce it in CI. - To find which Windows call a collector blocks in, capture a Go execution
trace with
--debug.enabledand/debug/pprof/trace?seconds=600. Collectors waiting in a Windows call use no CPU, so a CPU profile does not show it.