Skip to content
ENExplore Calculators

Fork Rate Calculator

Calculate process fork rate per second and its impact on system overhead.

About Fork Rate Calculator

/proc/stat's 'processes' line is a cumulative counter of every fork/clone-based process creation since boot (not the current count of live processes — that's a separate figure); sampling it twice and dividing by elapsed time gives forks per second, a useful process-churn metric independent of how many processes happen to be alive at any instant. A sustained fork rate above roughly 1000/sec is unusual for typical server workloads and often points to something worth investigating — a genuine fork bomb, a misbehaving supervisor restarting a crashing process in a tight loop, or a request-per-process architecture (like traditional CGI) under heavy load.

Formula

Fork rate

forks_per_sec = (processes_t1 − processes_t0) / interval_seconds

C_0
'processes' counter at t0
C_1
'processes' counter at t1
"\\Delta t"
interval in seconds

Worked example

With the default values below, Fork Rate Calculator returns Forks per Second of 200.00. Change any input above and every figure here is recalculated in your browser.

Inputs used

'processes' Counter at t0 (from /proc/stat)minimum 0
500,000
'processes' Counter at t1 (from /proc/stat)minimum 0
512,000
Sampling Interval (seconds)minimum 0.1
60

Results

Forks per Second
200.00
Status
Elevated — significant process churn; consider whether a process pool or persistent worker model could reduce fork/exec overhead.
Processes Created in Interval
12,000

Step by step

  1. 1Values used
  2. 2Fork rate
  3. 3Forks per Second= 200.00
  4. 4Status= Elevated — significant process churn; consider whether a process pool or persistent worker model could reduce fork/exec overhead.
  5. 5Processes Created in Interval= 12,000

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges 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

Is the 'processes' field in /proc/stat the same as the current number of running processes?

No — it's a cumulative, ever-increasing counter of total fork/clone calls since boot, not a live count. The current live process count instead comes from counting entries under /proc/ or from `ps -e | wc -l`; you need this cumulative counter specifically to compute a creation rate over time.

What causes an extremely high fork rate?

Common causes include a genuine fork bomb (a process recursively spawning copies of itself, sometimes malicious or accidental via a shell script bug), a supervisor (systemd, a custom watchdog) rapidly restarting a crash-looping service, or architectures that spawn a fresh process per unit of work (classic CGI scripts, or scripts calling external commands in a tight loop) under high load.

Why does a high fork rate matter even if the system has plenty of free CPU and memory?

Each fork/exec cycle has real overhead — copying (or COW-mapping) the parent's memory layout, setting up a new address space, and kernel bookkeeping — that adds up as pure overhead separate from the actual useful work being done, and can also accelerate PID/thread-count exhaustion even when other resources look fine.

Fork Rate Calculator – Calculate Forks per Second | Calcrivo