Home > Software design >  Memory utilization % impact on speed
Memory utilization % impact on speed

Time:03-22

Does anyone know if memory usage have on lambda response time? I understand that memory allocation is directly correlated to CPU allocation, but what about % memory utilization. e.g. 100mb allocated but 95mb is being used(for dependencies, that should be in layers). Will that effect the execution time?

CodePudding user response:

The utilisation at runtime does not change the allocated number of virtual CPU cores at runtime.

As you already know: the number of cores depends on the amount of memory you configure. But this is a configuration time allocation and has nothing to do with the runtime.

Commenter Anon Coward already mentioned, high memory utilisation still can have an impact on your Lambdas execution time. But it does not have to. It depends on what your code is actually doing.

The great thing is: you can measure all of this and you can therefore find out what the best memory size is for your Lambda function.

Even better, there are already projects that help you do exactly that:

https://github.com/alexcasalboni/aws-lambda-power-tuning

  • Related