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

Set lower CPU usage for test_shared_process_pool.py to avoid slowing down the test #1935

Conversation

yczhang-nv
Copy link
Contributor

@yczhang-nv yczhang-nv commented Oct 9, 2024

Description

test_shared_process_pool.py is taking longer than expected when running on remote-ci, causing multiple ci pipelines failed due to (1h) timeout.
This is probably because:

  • The number of workers of SharedProcessPool is set to 0.5 * os.sched_getaffinity(0) by default. If the test is running on a machine that has 64 cores, it will maintain 32 sub-processes.
  • For each unit test, the process pool need to create all the sub-processes and then join() all of them when tear down, which might be slow when the number of processes is large.
  • Running the test in remote-ci is slower than running locally, probably because there are multiple ci jobs running on the same machine

The test should run faster by setting the number of workers to 0.1 * os.sched_getaffinity(0) and it should avoid ci from being blocked by timeout.

Closes #1936

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

@yczhang-nv yczhang-nv requested a review from a team as a code owner October 9, 2024 19:28
@yczhang-nv yczhang-nv self-assigned this Oct 9, 2024
@yczhang-nv yczhang-nv added non-breaking Non-breaking change improvement Improvement to existing functionality labels Oct 9, 2024
@yczhang-nv
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 1452aaf into nv-morpheus:branch-24.10 Oct 9, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement to existing functionality non-breaking Non-breaking change
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[BUG]: test_shared_process_pool.py takes too long to run on remote-ci
3 participants