-
Notifications
You must be signed in to change notification settings - Fork 484
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
MinIO Java SDK is much slower compared to both mc
and AWS S3 Java SDK
#1332
Comments
How are you trying to upload? |
Using MinIO SDK: minioClient.uploadObject(
UploadObjectArgs.builder()
.bucket("test_bucket")
.object("test")
.filename("/path_to_some_file")
.build()
); Using S3 SDK: TransferManager tm = TransferManagerBuilder.standard()
.withS3Client(s3Client)
.build();
Upload upload = tm.upload("test_bucket", "test", file);
upload.waitForCompletion();
./mc cp {file_path} {bucket_path} |
Use part size using this UploadObjectArgs.Builder.filename() and tweak part size value as per your requirement. |
Tried different values: |
How was |
Here is the code: MinioClient minioClient =
MinioClient.builder()
.endpoint("http://127.0.0.1:9000")
.credentials("minioadmin", "minioadmin")
.build(); Yes. They are both on the same machine(my local machine). |
For 1GiB file upload, I see HTTP request/response takes 5 seconds and file read takes another 5 seconds. |
As expected, SHA256 and MD5 checksum calculation are slow. Probably I will move away from Java built-in SHA256/MD5 hasher. |
Previously, `UNSIGNED-PAYLOAD` is sent sha256sum and computed md5sum of body for HTTPS and computed sha256sum/md5sum of body for HTTP. This made the API slower. Now computed sha256sum is always sent for both HTTP and HTTPS. Fixes minio#1332 Signed-off-by: Bala.FA <[email protected]>
Previously, `UNSIGNED-PAYLOAD` is sent sha256sum and computed md5sum of body for HTTPS and computed sha256sum/md5sum of body for HTTP. This made the API slower. Now computed sha256sum is always sent for both HTTP and HTTPS. Fixes #1332 Signed-off-by: Bala.FA <[email protected]>
I am using Java 8 and trying to upload a 1 Gb file on a local MinIO server. Here is the amount of time it took for each of the following methods:
I wonder what makes MinIO SDK slower and how can I improve the speed.
The text was updated successfully, but these errors were encountered: