Improving lambda Cold start
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 38/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- aws
调研方向
从 issue 中描述的 Lambda layer 发布流程和冷启动测量方法开始。为每个受支持的 layer 构建包含和不包含该 layer 的示例应用,生成负载,改变会重新创建函数的参数,并使用提供的查询分析 REPORT 日志。完成的标准是获得各个 release 之间的测量结果、分析结果,以及针对受影响 layer 的已记录初始化优化。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Go
- 星标
- 433
- 派生
- 249
- 平均合并
- 1 天 12 小时
- 30 天内合并 PR
- 39
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
open-telemetry/opentelemetry-lambda 的其他 Issue
-
enhancement ruby
难度 2/5 1-3 小时 新手友好度 64/100
open-telemetry/opentelemetry-lambda#2741 ·
维护者通常 2 天内回复
-
processor/cold_start
难度 2/5 1-3 小时 新手友好度 67/100
open-telemetry/opentelemetry-lambda#2738 ·
维护者通常 2 天内回复
-
go
难度 2/5 1-3 小时 新手友好度 64/100
open-telemetry/opentelemetry-lambda#2736 ·
维护者通常 2 天内回复
-
enhancement javascript
难度 5/5 一周以上 新手友好度 35/100
open-telemetry/opentelemetry-lambda#2744 ·
维护者通常 2 天内回复
-
enhancement python
难度 3/5 1-2 天 新手友好度 55/100
open-telemetry/opentelemetry-lambda#2742 ·
维护者通常 2 天内回复
查看 open-telemetry/opentelemetry-lambda 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
-
难度 2/5 1-3 小时 新手友好度 73/100
-
[BUG] EphemeralJob matches every pod in the namespace when spec.selector is empty可能已有人在做 @vishnums2k5 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
openkruise/kruise#2656 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 65/100
rancher/rancher-ai-mcp#206 ·
维护者通常 1 天内回复
-
test: make command and stdio startup tests portable可能已有人在做 @dajiaohuang 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 73/100
mark3labs/mcp-go#1220 · 1 条评论 ·
维护者通常 1 天内回复