DEV Community

Discussion on: Deep dive: finding the optimal resources allocation for your Lambda functions

Collapse
 
rosswilliams profile image
rosswilliams • Edited

I often see different numbers than yours when going from 128 to 256 (or other doubling of power) I get a more than halving of execution time. But I can’t figure out why this is true. Is it because of the scheduler, CPU cache, or bandwidth?

Have you seen these cases, and if so how do you explain it.

Edit: most of my lambdas are a DynamoDB query, Update, and value return.

Collapse
 
alexcasalboni profile image
Alex Casalboni

Hi Ross, thanks for asking!

For DDB queries, it should be a mix of better CPU and better I/O throughput. It is quite common to see such an improvement when you double your function's power - it looks exactly like pattern 5 in the article :)

Collapse
 
rosswilliams profile image
rosswilliams

Yes thanks! I think your example for 512MB goes below 100ms, so its actually showing a bigger time reduction, but not reflected in the price information. Glad it’s not just me seeing this pattern

Some comments have been hidden by the post's author - find out more