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?

posta 6 mesi fa155 visualizzazioni
1 Risposta
3
Risposta accettata

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
ESPERTO
Uri
con risposta 6 mesi fa
profile picture
ESPERTO
verificato 6 mesi fa
profile picture
ESPERTO
verificato 6 mesi fa
profile pictureAWS
ESPERTO
verificato 6 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande