Bounding Resources Across Parallel Workers

A per-worker resource need multiplies with active workers. Choose limits based on the shared environment and actual workload.

Source
Anbloq
Language
English
Created
Updated
Chapters
4
Reading time
1 min
In this article4 chapters
  1. Trace an open-handle count
  2. Test the intended overhead
  3. Count shared capacity from per-worker usage
  4. Test pressure without making failures ambiguous

Trace an open-handle count

If every worker holds two open files, eight workers can hold sixteen concurrently. Additional application handles also count against a relevant limit. Process resource limits identify the shared budget.

Test the intended overhead

Reducing workers may preserve usability while changing throughput at peak load. Compare with complete work measurements.[1]

Count shared capacity from per-worker usage

With six workers each opening three files, their combined load may reach eighteen simultaneous handles before other process resources. A global limit of twelve would require fewer active opens or shorter lifetimes. See process resource limits.

Per-worker usage 3
Six active workers → 18 possible handles
Global limiter 12 → some work waits before opening

Test pressure without making failures ambiguous

Include enough work to reach the limit, then verify no handles are lost on exceptions. Distinguish a capacity wait from a failed open. Check measured throughput as well as allowed resource use.

References

  1. OpenMP Architecture Review Board, OpenMP API Specifications ↩