[Flow Control] Stage-Aware Saturation Gating for disaggregated P/D deployments - #2221
[Flow Control] Stage-Aware Saturation Gating for disaggregated P/D deployments#2221loicmarchal wants to merge 4 commits into
Conversation
fa4b5e6 to
d866463
Compare
| } | ||
| stageSat := p.saturationDetector.Saturation(ctx, part.endpoints) | ||
| metrics.RecordFlowControlPoolSaturation(p.poolName, part.name, stageSat) | ||
| if stageSat > saturation { |
There was a problem hiding this comment.
this is currently implementing the simple approach to calculate saturation = max(S_prefill, S_decode, S_interleaved).
I'm looking into a solution to count inflight prefill request into the decode saturation to correctly count for projected decode load and not gate too late (as discussed in #1186 (comment)).
There was a problem hiding this comment.
I think we land simple first and defer this. I am also interested in investigating some approaches here if you're open to collaborating.
There was a problem hiding this comment.
@LukeAVanDrie so you suggest we go with this solution first and look into the projected decode saturation as a followup PR? That's ok with me. Sure, of course I'll be happy to collaborate on that one.
Signed-off-by: Loic Marchal <lmarchal@redhat.com>
Signed-off-by: Loic Marchal <lmarchal@redhat.com>
Signed-off-by: Loic Marchal <lmarchal@redhat.com>
Signed-off-by: Loic Marchal <lmarchal@redhat.com>
d866463 to
4b3faf7
Compare
What type of PR is this?
/kind feature
What this PR does / why we need it:
The flow control system currently computes a single saturation value across all endpoints. In disaggregated prefill/decode (P/D) deployments, this masks stage-specific bottlenecks: a prefill surge can overwhelm
prefill workers while the global average stays low because idle decode workers dilute the signal, so backpressure never kicks in when it should.
This PR makes the dispatch cycle stage-aware by:
role label, without metadata, or with an unrecognized role value default to the decode bucket, matching the existing NewDecodeRole(allowsNoLabel: true) convention for monolithic deployment safety.
(not treated as saturated). When all partitions are empty, the detector is called on the full pool to preserve existing empty-pool behavior.
The existing gating logic (priority ceilings, HoL blocking) is unchanged -- it consumes the effective saturation value transparently. Monolithic deployments (no role labels) behave identically to before: all endpoints land in the decode bucket, producing a single-stage saturation equal to the previous flat-pool value
Which issue(s) this PR fixes:
Fixes #1186
Release note: