Skip to content
ENExplore Calculators

Module Execution Time Calculator

Estimate execution time for a specific Ansible module across a batch of hosts.

About Module Execution Time Calculator

Different Ansible modules have very different per-host cost profiles: `command`/`shell` execute directly and return quickly, `copy` and `template` must checksum and transfer file content, `apt`/`yum` cost depends heavily on whether the package cache is warm, and `git` involves a full network clone or fetch. This calculator applies representative per-host timings for common modules, then batches them by forks the same way any other task is batched.

Formula

total_module_time_sec = invocations × avg_module_duration_sec

invocations
Total module invocations across all hosts
avg_module_duration_sec
Average time per module execution (seconds)

Worked example

With the default values below, Module Execution Time Calculator returns Total Execution Time of 0.15. Change any input above and every figure here is recalculated in your browser.

Inputs used

Moduleone of command / shell (fast, direct exec), copy (slow, checksum + transfer), template (moderate, render + transfer), apt / yum (variable, depends on cache state), service / systemd (fast, simple state change), user (fast, single state check), file (fast, stat + chmod/chown), git (slow, clone/fetch over network)
copy (slow, checksum + transfer)
Hostsaccepts 1–100,000 hosts
100 hosts
Forksaccepts 1–1,000 forks
20 forks
Override: Seconds per Hostaccepts 0–600 seconds
0 seconds

Results

Total Execution Time
0.15 min
Per-Host Time for This Module
1.80 seconds
Batches
5 batches
Speedup from Parallelism
20.0 ×

Step by step

  1. 1Per-host time for this module= 1.80s/host
  2. 2Batches: ceil(hosts / forks)= 5 batches
  3. 3Total time: batches × seconds/host= 9.00s (0.15 min)
  4. 4Speedup vs. fully sequential= 20.0×

Assumptions and limits

  • The result is derived only from the 4 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax or compounding frequency into account.
  • Figures are rounded for display to 2 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Why is `apt`/`yum` marked as 'variable'?

Package manager modules can be nearly instant if the desired package is already installed (a no-op check), or take many seconds if it needs to update the cache and download/install — the default value here assumes a mixed, realistic average.

How accurate are these default per-host times?

They're representative starting points, not measurements of your specific environment — network latency, file sizes, package mirror speed and target host performance all shift the real numbers, so use the override field with your own measured timings when possible.

Why is `git` the slowest profile listed?

Unlike most modules that operate on local state or make a single API call, `git` typically has to negotiate a network transfer proportional to repository size, which dominates its execution time compared to simpler state-check modules.

Does this account for `async` tasks?

No — this models synchronous execution. Tasks run with `async` and `poll: 0` return immediately and don't block the batch, which would need a different model (fire-and-forget plus a separate job-status check).

Module Execution Time Calculator | Calcrivo