Why does increasing RAM decrease the lambda execution time?

0

Hey,

So I have come across this article that explains how increasing memory increases compute power. My code utilizes less than 2000 MB of RAM (1800 to be specific), however, the time to execute the code is around 8.3 seconds for 2GB of memory configured.

When I increase the memory to 4 GB the time reduces to 4 seconds. Now, I understand the concept that you pay for what you use. And for 4GB I am paying double than 2GB while I don't really need the RAM.

So the issue here is why is increasing RAM the only way to increase compute power?

asked 4 months ago128 views
1 Answer
3
Accepted Answer

I do not have an absolute answer for you, but one possible answer is the goal of keeping the service as simple as possible. The fewer the knobs, the better.

BTW, You get a full core at ~1.8 GB RAM. If your performance becomes better when you go above that number, it probably means that you are utilizing multiple threads in your function, otherwise, it would probably not cause better performance.

profile pictureAWS
EXPERT
Uri
answered 4 months ago
profile picture
EXPERT
reviewed 4 months ago
profile picture
EXPERT
reviewed 4 months ago
profile pictureAWS
EXPERT
reviewed 4 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions