Improving lambda Cold start
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 38/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- aws
調査の方向性
Issue に記載されている Lambda layer のリリースプロセスとコールドスタートの測定方法から始めます。サポートされている各 layer について、その layer を使用する場合と使用しない場合のサンプルアプリケーションを構築し、負荷を生成し、関数を再作成するパラメーターを変化させ、提供されたクエリで REPORT ログを分析します。完了の条件は、リリースごとの測定結果、プロファイリング結果、および対象となる 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時間
- マージ済み PR(30日)
- 39
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 日以内に返信
-
Fix install-toolsオープンgo
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
open-telemetry/opentelemetry-lambda#2736 ·
メンテナーはふだん 2 日以内に返信
-
enhancement javascript
難易度 5/5 1週間以上 初心者へのやさしさ 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
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
php/frankenphp#2829 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
tech-debt
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
teradata-labs/loom#624 ·
メンテナーはふだん 1 日以内に返信