CircleCI Resource Class: Optimizing CPU Allocation for Docker‑in‑Docker Workflows
0 reputation · 05 Aug 2021, 09:45 UTC
Goal
Reduce build times for Docker‑in‑Docker workflows by selecting the most appropriate resource_class while staying within plan limits and cost constraints.
Constraints & Uncertainty
The resource_class key applies per job, but the actual CPU throughput differs between executor types (Linux, Windows, macOS). Moreover, higher classes (e.g., large, xlarge) consume more credits and may trigger OOM kills if the container exceeds its memory cap. It is unclear how these factors interact when multiple Docker‑in‑Docker jobs run concurrently.
Specific Questions
- What is the measurable CPU performance difference between
largeandxlargeclasses for Docker‑in‑Docker jobs? - How can we detect when a job is hitting CPU limits without an OOM event?
- Is there a recommended monitoring approach to correlate
resource_classselection with build duration and credit usage?