Skip to content

Commit 9c61308

Browse files
loicmarchalLukeAVanDrie
authored andcommitted
addressing last review comments
Signed-off-by: Loic Marchal <lmarchal@redhat.com>
1 parent 913b176 commit 9c61308

4 files changed

Lines changed: 25 additions & 18 deletions

File tree

docs/metrics.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -258,15 +258,18 @@ Exposed when the `flowControl` feature gate is enabled.
258258
#### `flow_control_pool_saturation`
259259

260260
* **Type:** Gauge
261-
* **Labels:** `inference_pool`
262-
* **Description:** Pool saturation signal gating dispatch. 1.0 is the gating set point; values
263-
above 1.0 indicate the magnitude of oversubscription past it (deliberately not clamped). An
264-
empty pool reads as 1.0, and with the default utilization detector, endpoints with missing or
265-
stale metrics score as fully saturated (fail-closed).
266-
* **Usage:** When saturation reaches the usage limit threshold, the dispatch cycle skips
267-
dispatching and requests remain queued. A reading pinned at exactly 1.0 can be fail-closed
268-
stale-metrics or an empty pool rather than genuine overload (which typically reads above 1.0);
269-
check `flow_control_stale_endpoints` to disambiguate.
261+
* **Labels:** `inference_pool`, `stage`
262+
* **Description:** Pool saturation signal gating dispatch. The `stage` label partitions by
263+
pipeline role: `prefill` and `decode` are per-stage signals, `effective` is
264+
`max(prefill, decode)` and is the value used for gating. In monolithic deployments (no role
265+
labels) all endpoints land in the decode stage. 1.0 is the gating set point; values above 1.0
266+
indicate the magnitude of oversubscription past it (deliberately not clamped). An empty pool
267+
reads as 1.0, and with the default utilization detector, endpoints with missing or stale
268+
metrics score as fully saturated (fail-closed).
269+
* **Usage:** When the effective saturation reaches the usage limit threshold, the dispatch cycle
270+
skips dispatching and requests remain queued. A reading pinned at exactly 1.0 can be
271+
fail-closed stale-metrics or an empty pool rather than genuine overload (which typically reads
272+
above 1.0); check `flow_control_stale_endpoints` to disambiguate.
270273

271274
#### `flow_control_stale_endpoints`
272275

pkg/epp/flowcontrol/controller/internal/processor_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,15 +1214,15 @@ func TestProcessor(t *testing.T) {
12141214
makeEndpoint(bylabel.RoleDecode),
12151215
}
12161216

1217-
// Prefill is healthy but decode is saturated.
12181217
h.saturationDetector.SaturationFunc = func(_ context.Context, endpoints []fwkdl.Endpoint) float64 {
12191218
for _, ep := range endpoints {
1220-
role := ep.GetMetadata().Labels[bylabel.RoleLabel]
1221-
if role == bylabel.RoleDecode {
1222-
return 1.0
1219+
if ep.GetMetadata().Labels[bylabel.RoleLabel] != bylabel.RolePrefill {
1220+
// Any mixed or decode set reads healthy: the flat average is
1221+
// diluted by idle decode workers.
1222+
return 0.3
12231223
}
12241224
}
1225-
return 0.1
1225+
return 1.5 // homogeneous prefill subset: stage saturated
12261226
}
12271227

12281228
dispatched := h.processor.dispatchCycle(context.Background())

pkg/epp/metrics/llm_d_router_metrics.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -388,9 +388,11 @@ var (
388388
Subsystem: LLMDRouterEndpointPickerSubsystem,
389389
Name: "flow_control_pool_saturation",
390390
Help: metricsutil.HelpMsgWithStability(
391-
"Pool saturation signal gating Flow Control dispatch. 1.0 is the gating set point; values above 1.0 "+
392-
"indicate the magnitude of oversubscription past it. An empty pool reads as 1.0. With the default "+
393-
"utilization detector, endpoints with missing or stale metrics score as fully saturated "+
391+
"Pool saturation signal gating Flow Control dispatch. The stage label partitions by pipeline role: "+
392+
"'prefill' and 'decode' are per-stage signals, 'effective' is max(prefill, decode) and is the "+
393+
"value used for gating. 1.0 is the gating set point; values above 1.0 indicate the magnitude of "+
394+
"oversubscription past it. An empty pool reads as 1.0. With the default utilization detector, "+
395+
"endpoints with missing or stale metrics score as fully saturated "+
394396
"(fail-closed; see flow_control_stale_endpoints).",
395397
compbasemetrics.ALPHA),
396398
},

pkg/epp/metrics/metrics.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,9 @@ var (
370370
Name: "flow_control_pool_saturation",
371371
Help: metricsutil.HelpMsgWithStability(
372372
"[Deprecated: Use llm_d_epp_flow_control_pool_saturation] Pool saturation signal gating Flow Control "+
373-
"dispatch. 1.0 is the gating set point; values above 1.0 indicate the magnitude of oversubscription "+
373+
"dispatch. The stage label partitions by pipeline role: 'prefill' and 'decode' are per-stage "+
374+
"signals, 'effective' is max(prefill, decode) and is the value used for gating. "+
375+
"1.0 is the gating set point; values above 1.0 indicate the magnitude of oversubscription "+
374376
"past it. An empty pool reads as 1.0. With the default utilization detector, endpoints with missing "+
375377
"or stale metrics score as fully saturated (fail-closed; see "+
376378
"llm_d_epp_flow_control_stale_endpoints).",

0 commit comments

Comments
 (0)