Calculate how many hosts Ansible will manage in parallel given fork settings.
Ansible processes hosts in batches of size `forks`, running each batch's tasks to completion before moving to the next batch (unless using free strategy). Total run time is therefore the number of batches — ceil(hosts / forks) — multiplied by how long one batch takes to clear all tasks. Raising forks reduces batch count and total time, up to the point where the control node's CPU, memory or network saturates.
total_time_sec = ceil(hosts / forks) × time_per_batch
If hosts doesn't divide evenly by forks, the final batch runs with fewer hosts than your fork limit, meaning you're not using full parallelism for that batch — but it still takes roughly the same wall-clock time as a full batch since batch time is dominated by the slowest host.
Only up to the point where the control node runs out of CPU, memory, or available SSH connections. Beyond that ceiling, contention increases per-batch time enough to offset the reduction in batch count.
With the default 'linear' strategy, Ansible waits for every host in a batch to finish a task before starting the next task, batching by forks. The 'free' strategy lets each host run ahead independently, which this batch model doesn't capture.
Run with `-vvv` or the profile_tasks callback plugin to get per-task timing, then use the slowest host's cumulative task time as your 'time per batch' input.