-
Notifications
You must be signed in to change notification settings - Fork 866
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
S3 CRT client is almost an order of magnitude slower than the Netty client #5090
Comments
Hi @pwinckles, thanks for reaching out. The AWS CRT-based S3 client provides enhanced performance for transferring objects of size 8MB+ by utilizing multipart upload and ranged GET to achieve parallel transfers. There is some overhead involved (extra API calls such as HeadObject to get the size), so if you are transferring smaller objects, the overhead may not be paid off, and thus it may be slower. In your case, if you want to improve performance, I'd suggest using the standard Java S3 client with CRT HTTP client. https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/http-configuration-crt.html |
@zoewangg thanks for the response. It sounds like you're saying that CRT client is not a good general purpose client and I should use two clients -- CRT for the TransferManager and Netty for everything else. Is that accurate? |
AWS CRT-based S3 client is preferred in the following scenarios:
Side note: we are working on improving our dev guide to compare different flavors of S3 clients so that users know how to choose them based on their use-case :) |
Thanks! |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
While converting a project to use the new TransferManager, and thereby pulling in the CRT client, I noticed a substantial hit to performance. A test suite that used to run in 5 minutes, now takes 30 minutes. I have only tested the get object api in isolation while looking for the source of the slow down, but it is significantly slower than the Netty client the point that it's unusable.
Expected Behavior
I expected the CRT client to be as fast or faster than the Netty client.
Current Behavior
It's really slow.
Reproduction Steps
The following test that demonstrates the problem:
Histogram provided by HdrHistogram. Output unit is milliseconds.
The above test is for the CRT client, simply change the builder to
S3AsyncClient.builder()
to test the Netty client.Possible Solution
No response
Additional Information/Context
Here are the results I saw on my system when I ran the above test (unit is milliseconds):
CRT
Netty
AWS Java SDK version used
2.25.27 (CRT 0.29.14)
JDK version used
21.0.2
Operating System and version
Linux Fedora 39
The text was updated successfully, but these errors were encountered: