Does lambda memory allocation impact network bandwidth?

0

Even though the CPU and Memory is < 30% utilization at 1024mb, it appears that changing the lambda to 2048mb doubles the network throughput. My runtime is single threaded node.js so it shouldn't particularly be impacted by the additional vCPU. I can't find specific details about network scaling, it's just vaguely hinted at:

https://docs.aws.amazon.com/lambda/latest/operatorguide/computing-power.html

Adding more memory proportionally increases the amount of CPU, increasing the overall computational power available. If a function is CPU-, network- or memory-bound, then changing the memory setting can dramatically improve its performance.

Is there something more concrete to refer to?

질문됨 2년 전2067회 조회
3개 답변
3
수락된 답변

Yes, the network performance will increase with memory. There are no specifics as there is no definitive performance since Lambda compute is abstracted from you and it is also protocol and application specific. You should benchmark your function with various memory sized to determine where you meet your requirements.

profile pictureAWS
답변함 2년 전
profile pictureAWS
전문가
검토됨 2년 전
profile pictureAWS
전문가
검토됨 2년 전
  • What's surprising to me is that at 1GB memory I'm seeing 1mb/s, at 2GB I see 2mb/s, but after that it makes no meaningful difference switching it to 10GB. This seems really low, and there's no indication on what ranges AWS lambda operates in so I can't tell if this is within expected levels or not. Same code on my own machine hitting the same target gets 7mb/s down.

0

If your lambda is interacting with resources inside your VPC or with AWS services, you should VPC enable your lambda function if you haven't done so already - https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html

Also make use of interface VPC endpoints for AWS services. That way the traffic goes over the AWS network and not the internet - https://docs.aws.amazon.com/vpc/latest/privatelink/create-interface-endpoint.html

profile pictureAWS
전문가
답변함 2년 전
  • That's not an answer to anything I wrote, I was asking about network resources being affected by memory configuration like vCPU, nothing relating to VPC configuration.

0

All Lambda functions get the same type of network interface with the same bandwidth. However, the more memory you give your function, the more CPU it gets, which allows it to actually drive the network bandwidth, up to the limit that the network interface supports. This is why you will see an increase in bandwidth only until some point.

profile pictureAWS
전문가
Uri
답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠