Skip to content

Commit 6d96795

Browse files
testillanoEduardo Ramos Testillano (eramedu)
authored andcommitted
Add connection sizing formula to command-line help
For --traffic-client-connections help, include guidance for calculating the number of connections needed based on target rate, average response time, and the peer's max_concurrent_streams HTTP/2 SETTINGS value. Also clarify that each connection implies a dedicated I/O thread with no separate parameter needed on the client side.
1 parent ee8265b commit 6d96795

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

src/main.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,11 +450,20 @@ void usage(int rc, const std::string &errorMessage = "")
450450
<< " linearly (3 connections ~ 4,000-4,500 subs/s on 8-core hardware).\n"
451451
<< " Requests are distributed round-robin across connections.\n"
452452
<< " Equivalent to using multiple endpoints but without range splitting.\n\n"
453+
<< " Sizing for real servers with latency:\n"
454+
<< " connections >= (target_rate x avg_response_time) / max_concurrent_streams\n\n"
455+
<< " Where max_concurrent_streams is the peer's HTTP/2 SETTINGS value.\n"
456+
<< " Check with: nghttp -v http://host:port/path 2>&1 | grep MAX_CONCURRENT\n\n"
457+
<< " Example assuming max_concurrent_streams=100:\n"
458+
<< " 12,000 req/s with 0.9s avg response time:\n"
459+
<< " connections >= 12000 x 0.9 / 100 = 108\n\n"
453460
<< " Architecture: each connection = 1 dedicated I/O thread that handles\n"
454461
<< " HTTP/2 framing, response callbacks, and chain continuations (update,\n"
455462
<< " delete transforms run inline on the I/O thread). The CPS timer and\n"
456463
<< " initial request preparation run separately (timer thread or worker\n"
457-
<< " pool), so adding connections does not affect timer throughput.\n\n"
464+
<< " pool), so adding connections does not affect timer throughput.\n"
465+
<< " No separate I/O thread parameter is needed for the client side:\n"
466+
<< " connections = I/O threads.\n\n"
458467

459468
<< "[--traffic-client-worker-threads <threads>]\n"
460469
<< " Worker pool for client request preparation; defaults to nproc/2 ("

0 commit comments

Comments
 (0)