alexcasalboni / aws-lambda-power-tuning

AWS Lambda Power Tuning is an open-source tool that can help you visualize and fine-tune the memory/power configuration of Lambda functions. It runs in your own AWS account - powered by AWS Step Functions - and it supports three optimization strategies: cost, speed, and balanced.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add cold start statistics

mk0sojo opened this issue · comments

It would have been very useful to get some statistics on cold starts in the output. Both the AWS init time and the custom initialisation code would be interesting to see how much it differs with different memory configurations

@mk0sojo thanks for sharing, Jonas!

Some context first :)

Currently, the tool is excluding "outliers" with a trimmed mean - basically the top and bottom 20% of executions are discarded. This helps you reason about the largest majority of your Lambda executions and optimize cost/performance without the bias of cold starts.

Because the tool treats your function as a black box, it's hard to precisely identify cold starts (versus other cases, especially with complex inputs or downstream dependencies).

Last but not least, I feel like AWS is already providing the best tools to identify cold starts - have a look at AWS X-Ray and the recently announced CloudWatch Lambda Insights.

Ideally, I'd like to make sure that Lambda Power Tuning integrates with CloudWatch Lambda Insights so you can get the best of both tools.

Closing for now, as the tool is not intended for generating cold start statistics. #114 is still open and will let you optionally disable the trimmed mean behavior.