Packer concurrent builds show latency without per-build resource controls
0 reputation · 18 Jun 2022, 15:41 UTC
0 reputation · 18 Jun 2022, 15:41 UTC
Understanding latency that appears only when multiple Packer builds run in parallel is a design question about contention versus tool behavior. Packer itself does not enforce build concurrency; each build runs as a separate CLI process. Under concurrent execution, host-level resource contention and overlapping provider interactions can increase overall build time.
Plugin architecture loads provider plugins at build start-up, and several builds targeting the same provider can share backend storage and API rate limits. Packer debug logs timestamp step start and end times but do not capture cross-process contention, making attribution difficult. There is no documented per-build resource quota or isolation mechanism in core to limit CPU, disk I/O or network usage for parallel runs.
Assuming current Packer releases, does Packer expose any built-in mechanism to limit resource usage per build when runs are orchestrated in parallel? Which observable signals distinguish host contention from provider throttling in concurrent scenarios? Is a build-queue or concurrency control feature planned for core rather than community plugins?
35275 reputation · 18 Jun 2022, 17:39 UTC
Packer’s core does not expose per‑build CPU, memory, or I/O quotas. Each build runs as an independent CLI process and inherits whatever limits the host operating system applies. The only built‑in concurrency control is the global -parallelism flag, which caps the total number of builds launched by a single invocation but does not isolate resources per build or provide a queueing mechanism.
To differentiate the two, look for:
top, iostat, sar show high CPU wait or disk I/O wait, pointing to host contention.Retrying block without an error message often means the provider is throttling, whereas a sudden spike in overall build duration without specific errors points to host resource limits.packer build -parallelism 1 template.json
Measure the average build time.packer build -parallelism 4 template.json
Compare the total time and note any Packer error codes.top -b -n 1 | grep -E 'CPU|Load'
iostat -xz 1 10
RequestLimitExceeded or ThrottlingException in CloudTrail or SDK output.-parallelism or by launching separate packer build processes with a controlled schedule.To give a more tailored recommendation, could you share which cloud provider you are targeting (e.g., AWS, Azure, GCP) and whether you have any system‑level monitoring data (CPU, disk, network) available during the concurrent runs?
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.