moq-relay: --stats-enabled breaks --cache-capacity when subscribers rejoin often — memory grows without limit
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- rust
- Área
- performance
Línea de trabajo
Start with TrackState::pay_debt in track.rs and trace how stats-enabled session tagging affects cache_accessed() for groups when a subscriber rejoins. Compare eviction behavior with stats enabled and disabled, using the reproduction settings in the issue. Done means the cache respects --cache-capacity during repeated rejoins with stats enabled, without changing the reported stats behavior.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bottom line: With --stats-enabled, the relay stops evicting cached groups once subscribers rejoin a live track every few seconds. Memory then grows at the track's full ingest rate and never stops. Without --stats-enabled, the cache cap works. Seen on 0.17.10 and 0.17.18.
How to reproduce
- One publisher, one live track at about 1.9 Mbit/s.
- One subscriber that replaces its session every 6 seconds: open a new session, subscribe, then close the old one.
- Run the relay with
--cache-capacity 16MiB --stats-enabled. - Watch the relay's memory for 15 minutes.
What happens (relay memory, 0.17.10)
| Setup | Growth |
|---|---|
| 16MiB cap, stats off | none, flat at about 32 MiB |
| 16MiB cap, stats on | +10 MiB/min, 162 MiB after 15 min |
| 128MiB cap, stats on | +10 MiB/min, 409 MiB after 40 min |
| 0.17.18, 16MiB cap, stats on | +10 MiB/min |
| Stats on, one subscriber that never rejoins | none |
| Stats on, rejoin every 90 s | about +0.08 MiB/min |
The growth equals the ingest rate, so every group is being kept.
What we found
- Memory profile: all the growth is frame data from the publisher's writes.
- In
TrackState::pay_debt(track.rs), with stats on, most groups are skipped as "recently used" (cache_accessed() > average), so the cache never gets back under its cap. In one run, 456 groups were skipped and 45 evicted. With stats off, 0 were skipped and 94 evicted. - It isn't the
.statspublisher or the byte counters. Turning off just the stats session tagging (Handle::sessionreturningSession::default) stops the growth. Turning off everything else doesn't.
What we don't know: which part of the session tagging keeps those groups looking recently used.
- Lenguaje dominante
- Rust
- Estrellas
- 1.6k
- Forks
- 251
- Merge medio
- 10 h 10 min
- PR fusionados (30 d)
- 832
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 moq-dev/moq
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
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 86/100
Los mantenedores suelen responder en 1 día
-
Bump the quest flake input past kixel-ai/quest#1202 (Codex reviews use the config's gateway)Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
Todos los issues de moq-dev/moq
Issues similares
-
Mobile release verification reports missing build inputs with a custom Cargo target directoryAbiertobug good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsotto/sotto-authenticator#139 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
registrystack/registry-stack#2924 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
foundry-rs/starknet-foundry#4733 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100