perf: sequential fetch of `InRelease`

Abierto
#341 2 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
57/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go

Línea de trabajo

Start in internal/archive/archive.go and trace how setupIndexes calls fetchRelease for each suite, including signature verification and parsing. The issue proposes concurrent suite fetches; first check the existing archive tests and how they cover suite setup. Done means fetching the configured suites concurrently while preserving verification and parsing behavior, with tests covering the result.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

context

a cache-hot chisel cut of one small slice takes about 0.6-1.2s, and most of that is three InRelease round trips done one after another. setupIndexes (internal/archive/archive.go) loops over the suites in order and for each one fetchRelease downloads InRelease, verifies the signature and parses it before the next suite starts. with suites: [resolute, resolute-security, resolute-updates] that is three sequential https requests to the archive, 0.1-0.45s each depending on the archive's mood.

three runs of the same hot (🌶️) cut of python3-yaml_libs:

                       mean     std  <- 3 runs
suite details x3      530ms   290ms  InRelease fetch, verify, parse; sequential
index fetch x6         80ms    20ms  cache hits, parse
deb fetch + extract   260ms    20ms  cache hits
total                   ~1s  ~300ms

so 40-70% of a warm cut is waiting on 3 serial InRelease's. for a single image build it is a second, however for anything that cuts many times against one checkout it is the fixed cost of every cut (can you see a theme to my recent issues yet... 😅 non-contrived non-un-release example could be the chisel-releases ci though).

also, this gets worse with worse network (O(N) but git grad >1 so 150ms of lag will incur ~S*lag cost where S is n-of-suites aka ~3)

                     mean   std
direct (~40ms)      600ms  30ms
proxy +150ms        1.30s  80ms
proxy +300ms        1.77s  30ms

proposal

fetch the suites concurrently.

the suite's main and universe Packages could be fetched concurrently too, which matters on a cold cache (two ~75MB downloads per suite).

optionally, we could start a spiritual successor of the discussion from #254 and honour Valid-Until for InRelease files.

Lenguaje dominante
Go
Estrellas
434
Forks
74
Merge medio
1 d 30 min
PR fusionados (30 d)
1

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de canonical/chisel

Todos los issues de canonical/chisel

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.