-
Notifications
You must be signed in to change notification settings - Fork 657
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
WARN: 500 MB memory allocation not addressed in documentation for Client.PutObject #1478
Comments
The bigger problem I think is that buffers are not pooled. |
You can't pool random buffers @creker you can control the buffer size using PartSize |
@harshavardhana you can, you did that in the previous version of the library. Then it was removed which was a mistake I think. PartSize helps but it's not enough. Not pooling buffers still causes unnecessary load on the GC. |
We cannot we did the pooling it was worse. S3 API unfortunately makes it very hard for us to achieve an efficient streaming-based approach. |
The comment in the code should be updated so that the doc warns the user about this default behavior. I'm really not asking for anything more complicated than that. |
Feel free to send a PR to update the doc @sdhoward |
* PutObject with the -1 fileSize param allocates approx ~500 MB. * This warning should be clear in the docs and not only in the inline docs * ref: minio#1478
https://pkg.go.dev/github.com/minio/minio-go/v7#Client.PutObject
Related to #1473, please clarify that if the size is not specified, it will be assumed to be 5TB, each chunk will be assumed to be 500 MB, and that >500 MB will be allocated per upload.
The text was updated successfully, but these errors were encountered: