Skip to content

reduce concurrent manifest loading test contention #3954

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

Merged
merged 1 commit into from
Dec 17, 2021

Conversation

tomerd
Copy link
Contributor

@tomerd tomerd commented Dec 17, 2021

motivation: with manfiest loading async, the concurrent loading tests introduce significant contention on cpu since the underlying queue in unbounded

changes: use semaphore to limit the concurrency to max active cpus

motivation: with manfiest loading async, the concurrent loading tests introduce significant contention on cpu since the underlying queue in unbounded

changes: use semaphore to limit the concurrency to max active cpus
@tomerd
Copy link
Contributor Author

tomerd commented Dec 17, 2021

cc @pcbeard

@tomerd
Copy link
Contributor Author

tomerd commented Dec 17, 2021

@swift-ci please smoke test

@tomerd tomerd added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Dec 17, 2021
@abertelrud
Copy link
Contributor

abertelrud commented Dec 17, 2021

This problem being fixed here only affects main, is that correct? (not 5.6)

@tomerd
Copy link
Contributor Author

tomerd commented Dec 17, 2021

This problem being fixed here only affects main, is that correct? (not 5.6)

at this point yes, #3940 will bring async manifest loading into 5.6

@tomerd
Copy link
Contributor Author

tomerd commented Dec 17, 2021

@pcbeard should we pull this into the #3940 cherry-pick?

@tomerd tomerd merged commit a78e3f3 into swiftlang:main Dec 17, 2021
pcbeard pushed a commit to pcbeard/swift-package-manager that referenced this pull request Dec 22, 2021
motivation: with manfiest loading async, the concurrent loading tests introduce significant contention on cpu since the underlying queue in unbounded

changes: use semaphore to limit the concurrency to max active cpus
tomerd pushed a commit that referenced this pull request Dec 23, 2021
* Refactor manifest loading to use new async Process.popen()

* Use DelayableAction to ensure deferred actions are managed correctly

DelayableAction represents an action on a target that can be deferred
until a more appropriate time. In this case, we use defer to cleanup
objects in the case of early return error handling, but we need to
delay this action when passing the target for use into an async
completion block.

* Use delegateQueue to avoid reusing the TSCBasic.Process default queue

The manifest parser uses SourceControl.GitShellHelper synchronously,
which would cause a hang if using the default queue for completions.

* reduce concurrent manifest loading test contention (#3954)

motivation: with manfiest loading async, the concurrent loading tests introduce significant contention on cpu since the underlying queue in unbounded

changes: use semaphore to limit the concurrency to max active cpus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants