No long-term view of inference server performance to compare against current performance
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- go
- Área
- observability
Línea de trabajo
Read core/cost/usage/usage.go, core/cost/ledger/row.go, writer.go, and query.go, then trace archive replay in cmd/cortex/archive.go. First decide what durable performance data and baseline the feature should use, and how long-window results should be bucketed. Done means performance history can be compared across time and distinguished by server and model; the issue leaves those design choices open.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
To decide whether to switch inference servers, you need to know whether the one you are on is slower or less reliable than it usually is. That needs two things side by side: how it is doing now, and how it did over the last week or month. Cortex can show the first, roughly (see #1465 for why "roughly"), but not the second. It keeps no long-term record of how a server performed, only of what it cost.
The problem
-
Latency is gone after 6 hours. Response times live only in the in-memory usage ring: 360 one-minute buckets (
usage.NumBuckets,BucketWidth).window=24his refused withwindow 24h0m0s exceeds the 6h0m0s retained. After a restart, the ring refills only from the session archive's last six hours (usageReplayBudget,cmd/cortex/archive.go). -
The durable store records cost, not performance. The cost ledger (
core/cost/ledger) keeps per-minute rows on disk for 31 days, keyed by endpoint, model and agent. Its rows holdusage.Counts: requests, errors and token counts. They hold no latency, because latency is kept besideCountsin the ring bucket (latSum,latSumSq,latN), not inside it. A7dwindow on a live proxy returnslatMeanMs0 for every endpoint. -
Long windows come back as one number, not a trend.
today,7dandmonthare served from the ledger as a single bucket covering the whole window (bucketSeconds: 604800for7d, whateverresolutionis asked for). So even the error rate, which the ledger does keep, cannot be plotted over days. Only those three windows exist:30dis refused, and nothing lies between6handtoday. -
The errors kept on disk cannot be told apart. The ledger stores
Errorsas a count, without the status. A 429 (rate limited: wait, or switch) and a 5xx (server broken: switch) call for different responses, and the ledger merges them. Only the 6-hour ring hasgroup=status. -
The latency we do record measures the wrong thing for this question.
SessionEvent.Durationis total wall time, from the request entering the listener to the response being recorded. It grows with how long the answer is and includes Cortex's own plugin time. A server that has slowed down and an agent that asked for a longer answer look the same. There is no time-to-first-token, and no decode speed (tokens per second) (#951), and only a mean with standard deviation, with no percentiles (#1026). -
History is not tied to a server. Ledger rows are keyed by endpoint (host), not by router server name, and a server's URL can change. The same mapping gap as #1465 applies here, over a longer span.
The raw material does exist: the session archive keeps 30 days of events on disk, each with durationMs, host, status and token counts. But only its last six hours are ever replayed, and nothing aggregates it beyond that.
What the live proxy can and cannot say today
Last 7 days from the ledger (/v1/usage?window=7d&group=endpoint):
| server | requests | errors | latency over the week | trend over days |
|---|---|---|---|---|
ete-int |
9711 | 368 (3.8%) | not stored | not available |
glm |
6183 | 153 (2.5%) | not stored | not available |
Set against the 6-hour view in #1465 (glm at 50% errors over 6 requests), this is exactly the comparison the feature is for. The data needed to make it is either missing (latency) or flattened (one total per week).
Questions for the fix
- What performance data should be durable: latency sum, sum of squares and count per row (cheap; matches the ring), or a histogram, which percentiles (#1026) need?
- Should that data live in the cost ledger, which is already per-minute, keyed by endpoint and model, and kept 31 days, or in a separate store? The ledger currently admits inference traffic only, which is the right scope for this.
- Should long windows be plotted as a series (for example hourly buckets for 7 days, daily for a month) instead of one total?
- What is the baseline: the same server over the last 7 or 30 days, or that server and model at the same hour of day?
- How does this relate to #1400, which proposes alerting from a per-(endpoint, model) baseline? That issue needs the same durable data. This one adds a view where a person makes the comparison themselves. One store should serve both.
- Should a baseline be per server or per (server, model)? A slower model on the same server is not a degraded server.
Pointers
- In-memory ring:
core/cost/usage/usage.go(bucket,foldInto,NumBuckets). - Ledger:
core/cost/ledger/row.go(Row, its key),writer.go(Record's inference-only admission,Errors),query.go(single-bucket answers). - Archive replay:
cmd/cortex/archive.go(replayUsage,usageReplayBudget); archive retention is incore/session/archive(30 days). - Event timing:
pipeline.SessionEvent.Duration. - Related: #1465 (the pane mixes servers), #1400 (performance alerts), #951 (TTFT and response-time metrics), #1026 (percentiles).
Assisted-By: Claude (Anthropic AI) [email protected]
- Lenguaje dominante
- Go
- Estrellas
- 18
- Forks
- 42
- Merge medio
- 12 h 31 min
- PR fusionados (30 d)
- 258
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de rossoctl/cortex
-
UI shows costs for all sessions even when drilled into a sessionPosiblemente ocupada @esnible la tomó hace 7 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
rossoctl/cortex#1116 · 2 comentarios · 1 asignado ·
Los mantenedores suelen responder en 1 día
-
enhancement laptop
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
enhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 24/100
Los mantenedores suelen responder en 1 día
-
laptop
Dificultad 5/5 Más de una semana Aptitud para principiantes 15/100
rossoctl/cortex#1437 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Support mTLS for Session APIAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 22/100
Los mantenedores suelen responder en 1 día
Todos los issues de rossoctl/cortex
Issues similares
-
Mend: dependency security vulnerability
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
kube-tarian/sigrun#202 ·
-
question raised-by:verifier
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
medici-finance/assay#4013 ·
Los mantenedores suelen responder en 1 día
-
TestRegistry_ConcurrentMixedOperations fetches from the network and can hang the short suiteAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
tsukumogami/tsuku#2775 ·
Los mantenedores suelen responder en 1 día
-
automation models
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 1 día