-
Notifications
You must be signed in to change notification settings - Fork 66
Use ThreadPoolExecutor to parallelize RPM uploads to Pulp. #3716
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
Conversation
Pull Request validationFailed🔴 Failed or pending checks - Success🟢 Review - Reviewed by a member |
backend/copr_backend/storage.py
Outdated
def upload_build_results(self, chroot, results_dir, target_dir_name): | ||
max_workers = min(32, (os.cpu_count() or 1) * 5) # This could probably be hardcoded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be min(32, 80)
in our case, and we can expect ~100+ processes uploading stuff to Pulp, i.e. 3200 parallel threads.
Thank you, @dkliban, awesome contribution! I just think we should limit the concurrency "by default" (parallelize just the migration script). Otherwise looks good. |
@praiskup I updated the PR with your suggestions. |
Ideally please provide the docstrings (our preferred style), or prefix "internal" methods with |
e6a34e8
to
94f558f
Compare
LGTM |
No description provided.