-
Notifications
You must be signed in to change notification settings - Fork 478
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
Initial Request Performance Regression on Amazon Linux 2023 #1621
Comments
Thanks for all of this data @chrisoverzero. I'll do some investigation to see what I can find. |
This issue was most likely due to the the Amazon Linux 2023 using OpenSSL 3.0. We found a performance regression in OpenSSL 3.0 and .NET which caused the cert store to loaded twice. For the |
Comments on closed issues are hard for our team to see. |
@normj Thanks for all the work that you and others put into this issue – I was following along on other GitHub projects. Does the equivalent advice apply to Image-style Lambda Functions, as well? That is, even for a NativeAOT application, would one be better off using the dotnet8 base image rather than the provided.al2023 image? |
You can see the tweak we ended up doing was just set the
The lack of |
Describe the bug
When using the AWS SDK for .NET on Lambda with a runtime of "provided.al2023" the first request to an AWS service is significantly slower than it is under "provided.al2".
I've checked this with the Step Functions and S3 SDKs in particular.
Expected Behavior
Let's look under Amazon Linux 2. Here's an example initial request metric from the S3 SDK:
…and from a subsequent request:
Let's clean that up:
In short, the total time for an initial request is a little under 140ms with subsequent requests under 60ms. Around 120 of those 140 milliseconds were spent in
HttpRequestTime
. A totally reasonable place to spend milliseconds.Current Behavior
Doing the same for Amazon Linux 2023, first:
…and subsequent:
Cleaning that up as before, we get:
The overall
ClientExecuteTime
for the initial request has more than doubled. Around 310 of the total 330 milliseconds were spent inHttpRequestTime
. This and the above are only a single sample – I've sampled this many times and I first saw it manifest in a running application:These are stats for duration in milliseconds of first request binned by 1 day. Before and after the bump are "provided.al2". The bump is "provided.al2023".
Reproduction Steps
Repro is committed here. Publishing with
CI
set totrue
will perform AOT compilation. Please do let me know if there's more I can do.Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.S3: 3.7.300.3
AWSSDK.StepFunctions: 3.7.301.1
Targeted .NET Platform
.NET 8
Operating System and version
Amazon Linux 2, Amazon Linux 2023
The text was updated successfully, but these errors were encountered: