Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
97 views
in Technique[技术] by (71.8m points)

amazon web services - Benchmark AWS lambda performance

For security issues I wrote a lambda function that adds metadata to the data that should be saved in a DynamoDB database. Now I want to evaluate the impact of the additional metadata functionality. Therefore I want to check the performance of two lambda functions, one function with metadata and one without. I want to use this information for my Thesis.

How accurate are the metrics provided by lambda (memory used and execution time)? Can I use these parameters to evaluate the performance impact or is there a better way?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

The metrics provided by Lambda are very accurate as they are used to determine billing, with a caveat that the execution time reported does not include network latency incurred in calling the lambda and AFAIK it also does not include time spent provisioning the container on cold starts (it does included time spent initializing your code in the container, but I don't think it includes time spent starting the container itself, copying code, etc.)

In conclusion I don't think you can get more accurate measurements for memory used but for the execution duration there are other ways you may want to look at the data depending on what you care about.

However, if you just want to A/B test two different function implementations, executing in the same environment with the same input data, you can probably rely on the Lambda reported metrics.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...