Skip to content
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

High memory usage for PutObjectAsync with Streams #1138

Open
mgj opened this issue Jul 21, 2024 · 0 comments
Open

High memory usage for PutObjectAsync with Streams #1138

mgj opened this issue Jul 21, 2024 · 0 comments

Comments

@mgj
Copy link

mgj commented Jul 21, 2024

Possibly related issues: #564 #710

Passing a Stream to PutObjectAsync appears to read the entire stream into memory causing memory usage to spike when uploading large files:

Screenshot 2024-07-20 153715

This memory is not freed when the PutObjectAsync call returns nor when the stream is disposed. Sequential uploads causes the memory usage to grow further. The memory does seem to be released later.

The call used for testing:

await _minioClient.PutObjectAsync(new PutObjectArgs()
    .WithContentType(contentType)
    .WithBucket(bucketName)
    .WithObject(objectName)
    .WithStreamData(blobStream)
    .WithObjectSize(contentLength)
);

Is there any way to make Stream uploading more efficient? Is there any way to control the memory usage?

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant