[DX] choose optimal job size to reach best speed
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 48/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- php
- Área
- performance
Línea de trabajo
Start by tracing where the default jobSize and timeoutSeconds values are defined and how worker chunks are scheduled. Reproduce the reported benchmarks for small and large file sets, including the timeout case with heavier rules. Done means choosing and documenting defaults that improve throughput without causing the reported child-process timeouts.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
13 111 files
jobSize |
wall |
|---|---|
| 16 | 218 s |
| 150 | 86 s |
| 300 | 75 s |
279 files (a single module of the same project)
jobSize |
chunks | workers | wall |
|---|---|---|---|
| 16 | 18 | 14 | 14.1 s |
| 50 | 6 | 6 | 8.9 s |
| 100 | 3 | 3 | 9.5 s |
| 150 | 2 | 2 | 10.9 s |
| 300 | 1 | 1 | 12.2 s |
On 279 files even a single worker - jobSize: 300, no parallelism at all - beats the current default running on 14, because starting 14 processes costs more than the parallelism returns.
The optimum does move with corpus size (~50 for 279 files, 300+ for 13 111), but 100 is close to both, and anything in 100-200 beats 16 everywhere I measured.
So yes, increasing default job size to 100 might be a good idea, but:
jobSize and timeoutSeconds interact. A worker has to finish a whole chunk inside the per-job timeout, and 16 -> 150 multiplies the work per chunk by ~10. With a heavy rule set and a cold cache I hit exactly that - Child process timed out after 120 seconds, exit 1 - at jobSize: 150, where 16 completed. If the default goes up, the default timeout likely needs to go up with it, otherwise the failure mode moves from "slow" to "red build".
Originally posted by @webard in https://github.com/rectorphp/rector-src/issues/8489#issuecomment-5662569618
- Lenguaje dominante
- PHP
- Estrellas
- 137
- Forks
- 451
- Merge medio
- 7 h 11 min
- PR fusionados (30 d)
- 129
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 rectorphp/rector-src
-
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
rectorphp/rector-src#8493 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
rectorphp/rector-src#8488 · 1 comentario ·
Todos los issues de rectorphp/rector-src
Issues similares
-
Bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Automattic/safe-publish#594 ·
-
needs-triage Platform(Default)
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
-
HttpClient
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
symfony/symfony-docs#23092 ·
-
sync-en
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
-
sync-en
Dificultad 1/5 Menos de una hora Aptitud para principiantes 95/100