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

Less memory allocation with put_object() #930

Merged
merged 1 commit into from
Jun 19, 2020

Conversation

vadmeste
Copy link
Member

@vadmeste vadmeste commented Jun 18, 2020

put_object() allocates more memory than what we would expect. The
reason is that workers upload parts while the main code allocates
memory for the new parts that are being read from the source stream.

A semaphore is used in add_task() to make this latter blocking. That
way, the main code won't hurry to allocate new memory space for the
new data of the source stream.

Fixes #929

harshavardhana
harshavardhana previously approved these changes Jun 18, 2020
put_object() allocates more memory than what we would expect. The
reason is that workers upload parts while the main code allocates
memory from the new parts that are being read from the source stream

A semaphore is used in add_task() to make this latter blocking. That
way, the main code won't hurry to allocate new memory space for the
new data of the source stream.
Copy link
Member

@balamurugana balamurugana left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@harshavardhana harshavardhana merged commit 99dd78b into minio:master Jun 19, 2020
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

Successfully merging this pull request may close these issues.

Serious memory leak on multipart file upload
3 participants