# wrk2

Experimental wrk fork with constant\-throughput scheduling and histogram\-based latency accounting\.

ID: Q78 · Revision: 62

Type: software · License: Apache\-2\.0[^wrk2-license] · Status: unknown

Website: https://github.com/giltene/wrk2



wrk2 is an HTTP benchmarking fork of wrk that adds constant\-throughput scheduling and latency measurement based on intended request times\. Its documented goal is to reduce coordinated\-omission distortion when slow responses interfere with the planned workload\.[^wrk2-readme]

## Planned throughput

In addition to threads, connections and duration, wrk2 accepts an overall requests\-per\-second target\. It measures latency from when a request was intended to be sent, rather than only from its actual transmission\. This makes delayed scheduling visible in the reported distribution instead of silently changing the workload as the server slows\. The mechanism is documented by the author; no comparative benchmark was performed here\.[^wrk2-readme]

## Statistics and retained scripting API

The implementation uses HdrHistogram\-backed statistics while retaining wrk's Lua\-facing API\. Raw\-sample\-style access is emulated through percentile values, so compatibility at the API surface does not mean the underlying data representation is identical\. Existing reporting scripts should be reviewed for assumptions about individual samples before they are reused\.[^wrk2-readme]

## Calibration, precision and status

The README calls the project experimental and documents an initial calibration period of about ten seconds, warning that very short runs may not be informative\. It also gives approximately one\-millisecond timing granularity for the constant\-throughput implementation\. The supplied license is Apache\-2\.0\. These qualifications limit claims about sub\-millisecond precision or production support; they are separate from whether the tool can execute a benchmark\.[^wrk2-readme][^wrk2-license]

## Substitution scope

wrk2 can substitute for [wrk](/wrk) when the objective is a controlled\-rate HTTP benchmark with latency distributions that include scheduling delay\. It is not simply a newer release of the same command: the fork deliberately changes load and measurement semantics\. Its Lua compatibility can reduce adaptation work, but rate configuration, calibration duration and statistical interpretation still require review\. For existing saturation\-oriented runs, changing the tool without matching the experimental question can make historical numbers incomparable\.[^wrk2-readme][^wrk-readme][^wrk-scripting]

## Capabilities and substitutions

### Constant\-throughput scheduling — supported

Adds an overall request\-rate target and planned\-send\-time latency accounting\.[^wrk2-readme]

Use case: Controlled\-rate HTTP latency benchmarking · Platforms: epoll/kqueue\-based systems · Region: Version, plan and platform requirements apply

### Lua API compatibility — limited

Retains wrk's API but emulates sample access using histogram percentiles\.[^wrk2-readme]

Use case: Controlled\-rate HTTP latency benchmarking · Platforms: epoll/kqueue\-based systems · Region: Version, plan and platform requirements apply

### Very short or sub\-millisecond measurements — limited

Documented calibration and approximate millisecond granularity constrain interpretation\.[^wrk2-readme]

Use case: Controlled\-rate HTTP latency benchmarking · Platforms: epoll/kqueue\-based systems · Region: Version, plan and platform requirements apply

### [Substitute for wrk](/wrk) — limited

Can replace controlled\-rate benchmark workflows with planned\-time latency accounting; measurement semantics and calibration differ\.[^wrk2-readme][^wrk-readme]

Use case: Controlled\-rate HTTP latency benchmarking · Platforms: epoll/kqueue\-based systems · Region: Version, plan and platform requirements apply

## References

[^wrk2-license]: [wrk2 license](<https://github.com/giltene/wrk2/blob/master/LICENSE>) — Apache License 2\.0 (vendor; retrieved 2026-10-07T11:21:10Z)

[^wrk2-readme]: [wrk2 documentation](<https://github.com/giltene/wrk2/blob/master/README.md>) — Constant throughput, planned\-time latency and calibration limits (vendor; retrieved 2026-10-07T11:21:26Z)

[^wrk-readme]: [wrk documentation](<https://github.com/wg/wrk/blob/master/README.md>) — Thread/connection model and scripting overhead (vendor; retrieved 2026-10-07T11:20:49Z)

[^wrk-scripting]: [wrk Lua scripting API](<https://github.com/wg/wrk/blob/master/SCRIPTING>) — Independent thread environments, request callbacks and errors (vendor; retrieved 2026-10-07T11:20:59Z)

Source revision: https://substitutefor.net/entities/Q78?revision=62
