You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The recently released nodejs20.x runtime for AWS Lambda is establishing a concerning performance degradation trend for Node runtime and larger variation in the cold start values with maximum values 3X more than previous node version.
Based on running a benchmark over 100 points for a function (1KB code size, 256MB memory, us-east-1) with nodejs20.x runtime the average value is 240ms (compared to 171ms node18.x and 159ms for node16.x).
There is an increased variation in the initDuration for this runtime compared to the previous version, with the maximum values increased by several times. For the same 1KB-sized function, its maximum cold start value is now 793ms compared to 248ms (node18), and the P90 is 584ms compared to 182ms on node18.
This "instability" is confirmed for functions with variable package sizes (1K to 64MB) over 1000 cold start executions.
Hopefully, this is something that can be tuned in the next while to fulfill the high community expectations from the announcement of cold starts optimization actions such as the removal of extra root CA certs, lazy-loading of non-essential modules, and further tuning of the AWS SDK 3 library.
The text was updated successfully, but these errors were encountered:
adriantanasa
changed the title
Node.js 20.x. Longer cold starts than prior versions (18x,16x) with 3X top values compared to the average
Node.js 20.x. Longer cold starts than prior versions (18,16) with 3X top values compared to the average
Nov 21, 2023
I have run the benchmark recently and it seems the peak Init Duration issues are fixed now. I am curios what caused them though. Also the overall performance is improved almost matching the nodejs16.x runtime, You can see here the latest results for nodejs20.x. Great job, AWS team for addressing this ;)
PS @electricsheep please create another issue for your case. It might be something from the libraries used or other factor. This issue here was only for Init Duration with fairly plain functions with no npm libraries or AWS SDK calls.
Uh oh!
There was an error while loading. Please reload this page.
The recently released nodejs20.x runtime for AWS Lambda is establishing a concerning performance degradation trend for Node runtime and larger variation in the cold start values with maximum values 3X more than previous node version.
Based on running a benchmark over 100 points for a function (1KB code size, 256MB memory, us-east-1) with nodejs20.x runtime the average value is 240ms (compared to 171ms node18.x and 159ms for node16.x).
There is an increased variation in the initDuration for this runtime compared to the previous version, with the maximum values increased by several times. For the same 1KB-sized function, its maximum cold start value is now 793ms compared to 248ms (node18), and the P90 is 584ms compared to 182ms on node18.
This "instability" is confirmed for functions with variable package sizes (1K to 64MB) over 1000 cold start executions.
Gist results for all Nodejs runtimes:
Details of how the benchmark is designed and executed here: Size is (almost) all that matters for optimizing AWS Lambda cold starts
This issue was raised also by @o-alexandrov on the Nodejs20.x release topic:
Hopefully, this is something that can be tuned in the next while to fulfill the high community expectations from the announcement of cold starts optimization actions such as the removal of extra root CA certs, lazy-loading of non-essential modules, and further tuning of the AWS SDK 3 library.
The text was updated successfully, but these errors were encountered: