Open howardjohn opened 3 years ago
With --open-loop
I would expect more overflows, but in closed loop mode we report time blocked on resource shortages (pool queue size / connections) instead in a histogram. I would expect that the histogram indicating the amount/time NH is blocked to rise when going from 50k to 1M rps. That seems to be happening in the examples above.
I think throughput degrades when setting qps super high because NH will spend most of its time processing failed attempts, to a point where it significantly interferes with i/o processing on the event loop.
For a dedicated max qps feature: I'm thinking that maybe we want to specialise there, and have a separate flag. Instead of letting NH set the pace, we should let inbound responses directly trigger NH to issue a new request. I suspect this would emulate some of the other tooling. This would also allow us to make this compatible with configurations that influence pacing, like --jitter
. This should approach the actual max qps a server can handle, though maybe in some cases, a slightly higher qps could be obtained, as in this flow we're not always putting the server to work on a new reply while it is sending us one.
@oschaaf is there any way to get it to not get blocked? It seems odd the max throughput decays when we get too high. For example, we have 10331.70 requests and 64, so we need 161 RPS/connection. This gives us 6ms to send each request, which is far far longer than the reported latencies?
BTW, this is just something I personally stumbled upon, I don't think Istio does any thoroughput testing
Circling back to this, one useful trick may be to increase queue depth on the client, by tweaking --max-pending-requests
:
That allows some wiggle room with respect to any back-pressure as the system will have an opportunity to queue up requests when there's no free connections/streams to put them in to. What will happen is that on the first opportunity window, which arises when a reply comes in and triggers an i/o event, a queued request will be taken from the queue and assigned to a stream/connection. So effectively this gives some more wiggle room for the request-release pacing to ramp up to try and to maintain the configured pace.
I would like to send requests at the maximum RPS possible. Many other tools (hey: default, fortio:
-qps 0
) support this mode.In nighthawk,
--rps
must be between"value must be inside range [" '\x01' ", " '\U000f4240' "]
(yay for horrible error messages from envoy, this is 1-1million though).If I request 1M rps, I get an actual of 10k RPS. If I request 50k RPS, I am able to get 50k RPS. This indicates nighthawk is getting throttled unnecessarily, while the server can handle more load.
1M request logs
50k request logs
Both of these are from
nighthawk --rps ... --concurrency 1 --duration 10 --connections 64 --prefetch-connections
, againstfortio server
on the same machine.Based on this, the main thing I am seeing is pool_overflow=63 for the 1M requests, but pool_overflow=31 for 50k request.
I was a bit surprised the 50k QPS showed
pool_overflow=31
, despite everything seeming fine.It would be great if some combination of these were addressed:
pool_overflow
, add some documentation on what settings can be tuned to ensure we do not overflow. I didn't see much here, but perhaps I missed something.Results of varying QPS settings: