-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move to Arm64 lambdas #884
Conversation
0d5688d
to
9fb74b2
Compare
@@ -1,7 +1,7 @@ | |||
generator client { | |||
provider = "prisma-client-js" | |||
previewFeatures = ["views"] | |||
binaryTargets = ["native", "rhel-openssl-3.0.x"] | |||
binaryTargets = ["native", "linux-arm64-openssl-3.0.x"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -12,4 +13,26 @@ describe('The ServiceCatalogue stack', () => { | |||
const template = Template.fromStack(stack); | |||
expect(template.toJSON()).toMatchSnapshot(); | |||
}); | |||
|
|||
it('only uses arm64 lambdas', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test should help enforce usage of arm64 based lambdas.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having reviewed the table, it looks like our arm-based lambdas generally take longer to run, and have a higher memory usage. How does this balance out with a cheaper unit price?
With the same duration, and memory usage Arm64 is 20% cheaper than x86_64. The "worst" change is to the github-actions-usage lambda, which sees a 19.08% duration increase. Given these lambdas don't have need to complete in a given timeframe, I think this change is acceptable. Whilst it'll take longer, the Arm64 version will cost ~16% less1. Footnotes
|
Arm based lambdas are cheaper and more performant. See https://aws.amazon.com/blogs/aws/aws-lambda-functions-powered-by-aws-graviton2-processor-run-your-functions-on-arm-and-get-up-to-34-better-price-performance/.
What does this change?
Change the architecture of each lambda to Arm64.
Why?
Arm based lambdas are cheaper and more performant. See https://aws.amazon.com/blogs/aws/aws-lambda-functions-powered-by-aws-graviton2-processor-run-your-functions-on-arm-and-get-up-to-34-better-price-performance/.
How has it been verified?
Statistics
Here are some statistics after invoking the x86_64 and arm64 versions of each lambda once with the same input.
As mentioned in the linked post:
In this estimate1 of 100,000 requests per month, of 50,000ms duration, and 1,024MB memory, Arm64 costs $61.33 and x86_64 $76.67.
That is, whilst the statistics do not suggest a dramatic change in performance, we will see a reduction in the bill.
Footnotes
URL will expire in 1 year. ↩