4 Comments
User's avatar
Abhishek Pan's avatar

A 5 to 7 minute break-even is easy to blow past when an agent turn waits on a human approval or a slow tool call. Before picking a hold time I'd pull the real gap between turns from traces, since a healthy median can hide a long tail that never comes back in time.

Lorenzo Bradanini's avatar

Fully agree with that. The 5 to 7 mins only covers the price side: how long a session's cache can sit in HBM before the memory it takes up costs more than its cached tokens bill when it comes back. Whether sessions actually come back that fast is a question for traces, and we didn't have any.

And you're absolutely right that the median is the wrong thing to read from them. What sets the hold time is the return rate of sessions that have already been idle for a while. Holding one for another minute pays as long as, among sessions idle that long, roughly one in five to one in seven come back within the next minute; that's just the break-even turned into a rate. Once the rate drops below that, holding mostly pays for sessions that won't make it. My guess is that slow tool calls stay above the line and human approvals fall below it within a few minutes, but that's exactly what the traces would show.

Those late sessions are the ones to spill to host memory instead of dropping, since reloading even a million token cache over PCIe takes tens of milliseconds. If you have a gap distribution you can share, I'd like to see the curve.

Abhishek Pan's avatar

Makes sense. The return rate of sessions that have already sat idle a few minutes is the number to pull, since that’s exactly the tail a median hides.