Improving lambda Cold start
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 38/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- aws
- Área
- cloud, observability, performance
Línea de trabajo
Comienza con el proceso de release de Lambda layer y la metodología de medición de cold starts descritos en el issue. Crea aplicaciones de ejemplo con y sin cada layer compatible, genera carga, varía el parámetro que recrea la función y analiza los logs REPORT con la consulta proporcionada. Se considera terminado cuando haya mediciones entre releases, resultados de profiling y optimizaciones de inicialización documentadas para las layers afectadas.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Is your feature request related to a problem? Please describe.
A Lambda cold start happens when a new instance of a Lambda function must be created and initialized. The cold start refers to the delay between invocation and runtime created by the initialization process.
New instances needs to be initialized whenever other instances have expired due to inactivity or when there are more invocations than active instances. Cold starts are an inherent problem with Lambda functions because it is not possible to keep lambda initialized forever.
The OpenTelemetry SDK was not created with Lambda functions in mind. If you use OpenTelemetry inside a lambda function, the overhead of initializing the SDK and optionally auto instrumenting the application code adds up in the cold start time. This is specially painful for users because this inserts high latency in their application and increases the cost of running the lambdas.
Describe the solution you'd like
This proposal will tackle the cold start time of the OpenTelemetry lambda layers with the following plan:
Plan:
- Continuously measure the cold start time of the layers with each release. This will help catching regressions in performance and also show trends and where we should invest our time.
- Profile each layer to identify where all this time is spent on in the code.
- Propose optimizations in the initialization of the SDK in each layer: Using the profiling information from the previous step, look for low hanging fruits and also more complex refactoring that will improve the performance.
Methodology for measuring the cold startup:
- Measure the cold start time for lambdas with and without the layers for each supported layer.
- Create a sample application and deploy to a lambda function
- Generate load for this sample application
- Vary a parameter in the lambda function that will force the lambda to be recreated.
- Parse the logs of the lambda function with the following query:
filter @type="REPORT"
| filter ispresent(@initDuration)
| stats count(@initDuration) as coldStartCount, pct(@initDuration, 50) as p50Init, pct(@initDuration, 90) as p90Init, pct(@initDuration, 99) as p99Init group by @log
Methodology for profiling the lambda functions:
- TBD - We will need to
Additional context
References
https://github.com/open-telemetry/opentelemetry-lambda/issues/263
- Lenguaje dominante
- Go
- Estrellas
- 433
- Forks
- 249
- Merge medio
- 1 d 12 h
- PR fusionados (30 d)
- 39
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 open-telemetry/opentelemetry-lambda
-
enhancement ruby
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
open-telemetry/opentelemetry-lambda#2741 ·
Los mantenedores suelen responder en 2 días
-
processor/cold_start
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
open-telemetry/opentelemetry-lambda#2738 ·
Los mantenedores suelen responder en 2 días
-
Fix install-toolsAbiertogo
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
open-telemetry/opentelemetry-lambda#2736 ·
Los mantenedores suelen responder en 2 días
-
Use node-sdk package for layerAbiertoenhancement javascript
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
open-telemetry/opentelemetry-lambda#2744 ·
Los mantenedores suelen responder en 2 días
-
enhancement python
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
open-telemetry/opentelemetry-lambda#2742 ·
Los mantenedores suelen responder en 2 días
Todos los issues de open-telemetry/opentelemetry-lambda
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
php/frankenphp#2829 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día
-
tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
kind/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
teradata-labs/loom#624 ·
Los mantenedores suelen responder en 1 día