-
Notifications
You must be signed in to change notification settings - Fork 647
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
Limit memory usage on PutObject [faq] #1496
Comments
@pizixi Limit |
Or provide the correct content length for SDK to automatically calculate the optimal part size. |
hi: |
If you are passing |
According to the documentation for `PutObject`, setting objectSize to -1 causes a multipart Put operation, which can result in high memory usage. Something similar has already been reported in minio/minio-go#1496 This PR changes the behavior so it tries to determine the file size before uploading it. Should the given io.Reader not be a file, it falls back to using `-1`. In my testing this change has reduced the memory usage when uploading files to OICS quite a bit: From over 1GB for a single user, down to <300MB.
According to the documentation for `PutObject`, setting objectSize to -1 causes a multipart Put operation until the input stream reaches EOF, which can result in high memory usage. Something similar has already been reported in minio/minio-go#1496 This PR changes the behavior so it tries to determine the file size before uploading it. Should the given io.Reader not be a file, it falls back to using `-1`. In my testing this change has reduced the memory usage when uploading files to OICS quite a bit: From over 1GB for a single user, down to <300MB.
According to the documentation for `PutObject`, setting objectSize to -1 causes a multipart Put operation until the input stream reaches EOF, which can result in high memory usage. Something similar has already been reported in minio/minio-go#1496 This PR changes the behavior so it tries to determine the file size before uploading it. Should the given io.Reader not be a file, it falls back to using `-1`. In my testing this change has reduced the memory usage when uploading files to OICS quite a bit: From over 1GB for a single user, down to <300MB.
According to the documentation for `PutObject`, setting objectSize to -1 causes a multipart Put operation until the input stream reaches EOF, which can result in high memory usage. Something similar has already been reported in minio/minio-go#1496 This PR changes the behavior so it tries to determine the file size before uploading it. Should the given io.Reader not be a file, it falls back to using `-1`. In my testing this change has reduced the memory usage when uploading files to OICS quite a bit: From over 1GB for a single user, down to <300MB.
According to the documentation for `PutObject`, setting objectSize to -1 causes a multipart Put operation until the input stream reaches EOF, which can result in high memory usage. Something similar has already been reported in minio/minio-go#1496 This PR changes the behavior so it tries to determine the file size before uploading it. Should the given io.Reader not be a file, it falls back to using `-1`. In my testing this change has reduced the memory usage when uploading files to OICS quite a bit: From over 1GB for a single user, down to <300MB.
According to the documentation for `PutObject`, setting objectSize to -1 causes a multipart Put operation until the input stream reaches EOF, which can result in high memory usage. Something similar has already been reported in minio/minio-go#1496 This PR changes the behavior so it tries to determine the file size before uploading it. Should the given io.Reader not be a file, it falls back to using `-1`. In my testing this change has reduced the memory usage when uploading files to OICS quite a bit: From over 1GB for a single user, down to <300MB.
What should I do if I use a lot of memory when uploading large files?
The text was updated successfully, but these errors were encountered: