TechEmpower/FrameworkBenchmarks — pull request #855 by methane (2014-05-07 13:41:27+00:00)
Title: Set timeout = concurrency.

Default timeout of wrk is 2 sec. It is too small for large concurrency.

Here is sample scenario.

Given: concurrency=64, backlog (or queue in reverse proxy)=256, average response time=100ms, worker=2

1. wrk sends 64 requests.
1. workers start processing 2 requests. 62 requests are queued.
1. After 2 seconds, 20 requests are processed and 42 requests are in queue.
1. wrk sends new 20 requests in the 2 seconds. After 2 seconds, wrk timeout remained 42 requests and send new 42 requests.
1. Server continue to process old requests in queue without knowing wrk has timeouted those.
1. When server reaches new 20+42 requests, wrk has timeouted those requests already.

In this scenario, server may process 100 * 2 * duration requests. But wrk only reports 20 success.