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

Reduce S3Uploader memory usage during directory scan #1906

Merged
merged 4 commits into from
Feb 20, 2019

Conversation

ssalinas
Copy link
Member

@ssalinas ssalinas commented Feb 1, 2019

Our JavaUtils. iterable function was previously taking a DirectoryStream -> Lists.newArrayList(stream.iterator()). This caused all paths in a directory to be in memory at once. For particularly large directories this was causing ooms in the uploader. Files.walk does this in more of a streaming fashion and should save us from loading the entire directory tree in memory before iterating over it

@ssalinas
Copy link
Member Author

ssalinas commented Feb 1, 2019

Confirmed fix in our QA env. uploader that previously grew to ~1600MB is now topping out at 13MB of heap

@pschoenfelder
Copy link
Contributor

🚢

@baconmania
Copy link
Contributor

🚢

@ssalinas ssalinas merged commit 6607e5d into master Feb 20, 2019
@ssalinas ssalinas deleted the uploader_memory_reduction branch February 20, 2019 14:07
@ssalinas ssalinas added this to the 0.23.0 milestone Feb 21, 2019
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.

3 participants