Fix/copilot concurrency limit - #7730
Draft
ApfelPresse wants to merge 3 commits into
Draft
Conversation
Signed-off-by: kev <12345678+ApfelPresse@users.noreply.github.com>
Signed-off-by: kev <12345678+ApfelPresse@users.noreply.github.com>
Signed-off-by: kev <12345678+ApfelPresse@users.noreply.github.com>
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #7730 +/- ##
==========================================
+ Coverage 57.18% 57.23% +0.04%
==========================================
Files 930 931 +1
Lines 58245 58314 +69
==========================================
+ Hits 33308 33376 +68
+ Misses 21874 21869 -5
- Partials 3063 3069 +6
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are the changes needed?
Before this change multipart upload/download could start one goroutine per file.
With many small files, this created too much parallel work, drove CPU usage up, and in some cases caused jobs to fail.
This PR adds a configurable concurrency limit, so the number of parallel transfers is capped (
GOMAXPROCS * concurrency-per-cpu, with a maximum limit).That makes behavior more stable in Kubernetes/container environments while still allowing tuning for throughput.
What changes were proposed in this pull request?
--concurrency-per-cpu(default:data.DefaultConcurrencyPerCPU)GOMAXPROCS * concurrency-per-cpu, bounded byMaxConcurrencyDownloadFileFromHTTPnow returns an error for non-2xx responsesHow was this patch tested?
sanitizeConcurrencyPerCPUgetConcurrencyacquireSemaphore(including context cancellation)Labels
fixed
changed
Setup process
Screenshots
Check all the applicable boxes
Docs link
Flytecopilot readme.md file