In this article
A bounded result buffer can couple request submission to result consumption, making reporting part of the load model.
The comparison being tested
A replay harness sends inference calls through Executor.map and writes each yielded result to a slow report sink. After enabling a bounded result buffer, measured server load falls. The server may be unchanged: submission can now depend on how quickly the consumer drains results. The experiment is testing a coupled client pipeline unless that feedback is identified and intentionally included.
The confounding mechanism
Python’s Executor reference says that a full buffersize limit pauses input iteration until a buffered result is yielded. The limit concerns submitted tasks whose results have not yet been yielded, not simply currently running workers. The parameter was added in Python 3.14. Process-pool chunksize is another control, whereas it has no effect for ThreadPoolExecutor; the harness must preserve which executor it actually uses.
Fix the experimental contract
Define the intended arrival schedule, submission boundary, worker pool, result-consumption behavior and buffering policy. Decide whether downstream report storage is part of the system under test. If it is outside the target, measure its delay separately and bound its influence without creating an unbounded memory queue. Merely increasing the thread count does not remove a consumer-imposed submission gate.
A step-by-step comparison
First instrument item preparation, submission, operation completion and result yield as separate events. Next replace the slow sink with a bounded lightweight fixture while keeping inference calls unchanged. Compare actual submission times and outstanding work, then restore the intended sink. Vary the buffer in an isolated check to see whether load follows result consumption. Retain dropped, unfinished and never-submitted items explicitly.
Evidence required for the result
Keep the effective Python version, executor type, buffering and chunking settings with event-level counts. A control deliberately pauses result consumption while the endpoint responds promptly: the audit should identify a client-side submission gap rather than diagnose server idleness as spare capacity. Completion timestamps must originate at operation completion, because later iterator consumption can include reporting delay and ordered-result waiting.
Interpretation and limits
Backpressure may be the correct design for a finite-resource client. The error is interpreting its throttled trace as evidence of a fixed independent offered load. Removing the buffer may introduce memory pressure and change another part of the experiment, so it is not an automatic fix. The report should state whether results describe the complete client-consumer pipeline or the endpoint under the declared submission schedule.
Primary references and related reading
A bounded result buffer can couple request submission to result consumption, making reporting part of the load model. Python Executor submission and result buffering; Locust user tasks and wait time.
The proposed investigation of executor map consumer buffer load is not an executed deployment benchmark. Related reading: Open and closed load models for an inference API; Detect a load generator that hides stalled requests.
Earn rental income from GPUs
Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.