In this article
Measure the resource tail after cancellation separately from client status, and keep shared-batch attribution distinct from billing.
A user stops a streamed answer, but a server-side worker may still be active. For an operator, the economic question is how much resource the abandoned request continues to occupy and which later work it delays. This is different from checking whether a cancellation signal arrived. Build a resource record around the cancellation boundary without assuming that a stopped client, a completed RPC and an empty GPU queue describe the same event.
Define the abandoned-work scenario
Use a harmless generation fixture with bounded output and a predetermined client stop point. Keep a normal-completion control with the same initial request. The desired comparison concerns resource consumption and useful completions under a stated arrival pattern. It does not establish what an external provider invoices or whether a customer receives a credit. Those are separate contractual questions that cannot be inferred from a client usage object missing its final message.
Cancellation is cooperative resource release
The gRPC cancellation guide explains that a cancellation communicates discontinued client interest, while application handlers must coordinate stopping their work. Upstream propagation also depends on implementation. A worker can therefore retain buffers or continue computation after the caller leaves. The deadline guide similarly makes the server application responsible for stopping spawned activity. These contracts justify observing residual work; they do not prove that a particular inference engine leaks resources.
Choose an honest resource boundary
Record when the client stops, when the serving application observes cancellation and when the corresponding operation reaches a terminal state. Keep resource cleanup as another observation. For a shared batch, request latency is not exclusive GPU execution time: several requests can occupy the same interval. Use pool-level resource measurements over comparable windows, and label any per-request allocation rule as an estimate. Summing overlapping request durations would manufacture resource consumption that the device never had.
Run a controlled accounting protocol
First preserve model, engine, request fixture and arrival settings. Next run normal completion and capture the server’s terminal records. Then repeat with the predetermined cancellation point, keeping other work comparable. Collect application identifiers and pool telemetry through cleanup, rather than ending collection at the client disconnect. Finally reconcile attempted requests, accepted results, cancelled operations and unresolved states. Keep an idle baseline and sampling cadence available when interpreting the resource series; subtraction can be misleading when unrelated workloads vary.
Require evidence for the residual interval
The useful artifact is a joined event record with the relevant clocks, identifiers, observed state transitions and resource window. A request that disappears from one process must not silently disappear from the workload denominator. If the engine cannot expose request-level execution, report the pool-level difference and its attribution limit. The cancellation-chain guide supplies propagation checks; operating economics explains why busy hardware and useful work are different quantities.
Interpret failures without inventing settlement
A failure case is rapid client closure followed by continued upstream generation, which consumes capacity without producing an accepted answer for that caller. Another is a monitoring gap that makes an unknown outcome look like zero work. Repeat bounded fixtures before calling either pattern a persistent defect. Shared batching, cache reuse and concurrent traffic can confound attribution. The defensible conclusion names the tested residual resource boundary and uncertainty; it does not promise a universal cancellation saving, precise per-request GPU charge or a provider billing rule.
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.