Category
Performance
Description
Cloud-init secrets are created one at a time in a for loop in runE. With many VMs (e.g., --vm-count 50 across multiple workloads), this becomes the bottleneck before the concurrent VM creation phase. These are independent API calls with no ordering dependency that could be parallelized.
Severity
Low — cosmetic or minor inconvenience
Affected Files
cmd/virtwork/main.go — secret creation loop iterates plans sequentially, calling resources.CreateCloudInitSecret one at a time
Proposed Fix
Use an errgroup.Group (with a concurrency limit) to create secrets in parallel, similar to the existing VM creation pattern. This should be done as part of or after the orchestrator extraction (#123) to avoid further complicating runE.
Area: VM provisioning
Architecture Layer: Layer 4 - Orchestration (cmd, cleanup)
Category
Performance
Description
Cloud-init secrets are created one at a time in a for loop in
runE. With many VMs (e.g.,--vm-count 50across multiple workloads), this becomes the bottleneck before the concurrent VM creation phase. These are independent API calls with no ordering dependency that could be parallelized.Severity
Low — cosmetic or minor inconvenience
Affected Files
cmd/virtwork/main.go— secret creation loop iteratesplanssequentially, callingresources.CreateCloudInitSecretone at a timeProposed Fix
Use an
errgroup.Group(with a concurrency limit) to create secrets in parallel, similar to the existing VM creation pattern. This should be done as part of or after the orchestrator extraction (#123) to avoid further complicatingrunE.Area: VM provisioning
Architecture Layer: Layer 4 - Orchestration (cmd, cleanup)