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

gh-82054: Parallel test sharding of test_asyncio and test_multiprocessing #103934

Closed

Conversation

zitterbewegung
Copy link
Contributor

@zitterbewegung zitterbewegung commented Apr 27, 2023

Summary:

This runs test_asyncio and test_multiprocessing sub-tests in parallel using sharding from cinder. These two tests are typically the long-poles in runs because they are modules with a lot of further sub-tests run serially. By breaking out the sub-tests as independent modules we can run a lot more in parallel.

After porting we can see the direct impact on a multicore system.

  • Without this change:
    • Running make test is 5 min 26 seconds
  • With this change:
    • Running make test takes 3 min 39 seconds

The drawbacks are that this implementation is hacky and due to the sorting of the tests it obscures when the asyncio tests occur and involves changing CPython test infrastructure but, the time saved it is worth it . I believe this is a good tradeoff but in the future this could be refactored.

original_time_cpython.txt

optimized_asyncio.txt

optimized_multiprocess_asyncio.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants