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 concurrency when copying image files to S3, add 1 GB memory #83

Merged
merged 3 commits into from
Aug 8, 2024

Conversation

nathanielrindlaub
Copy link
Member

@nathanielrindlaub nathanielrindlaub commented Aug 7, 2024

Issue

The ingest-zip Batch job was running out of memory while copying the images to S3 if the images were larger than usual (we first discovered it with a folder of 995 2.4 MB images).

Solution

I added an extra GB of memory to the Batch Job Definition and reduced the asyncPool concurrency from 1000 to 100. Surprisingly, in my testing this actually seemed to make the image saving go faster, not slower.

@nathanielrindlaub
Copy link
Member Author

@ingalls, if you have a minute do you mind giving me the green light to make this change? I had vaguely remembered talking about why you had chosen 1000 for the asyncPool concurrency here and recall there being a reason, but I searched around and couldn't find any documentation or discussion around that decision.

@ingalls
Copy link
Contributor

ingalls commented Aug 7, 2024

Hey! Yeah I was concerned about raising it any further due to memory constraints. I should have profiled it smaller to see if it was CPU bound but this is a great catch. Merge away in my mind!

@nathanielrindlaub
Copy link
Member Author

Thanks @ingalls! hope all is well!

@nathanielrindlaub nathanielrindlaub merged commit d5be18f into master Aug 8, 2024
3 checks passed
@nathanielrindlaub nathanielrindlaub deleted the ingest-zip-memory-issue branch August 8, 2024 16:52
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.

2 participants