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

Get job participating clients from Job Meta #3270

Merged
merged 10 commits into from
Mar 3, 2025

Conversation

yanchengnv
Copy link
Collaborator

@yanchengnv yanchengnv commented Feb 28, 2025

Fixes # .

Description

At the start of a job, the CJ sends a sync message to the server to get information about the job's participating clients. This mechanism has a few issues:

  • CJs are started at about the same time. If there are many clients (e.g. there could be thousands of clients for handling edge devices), the SP will be under a lot of pressure to process so many messages at the same time.

  • In case of Simulator, if the number of subprocesses is smaller than the number of clients, then some clients will be swapped in and out. Each time a client is swapped in, it needs to send the sync message again. But if this happens after the job is already done, it will fail, as reported by QA.

This PR gets rid of the sync mechanism from CJs. Once the SP starts to run a job, it already knows what clients will participate in the job. SP then includes such info in the job's metadata in the message to CPs to start the job. Once started, the CJ no longer needs to send the sync message to SP to get participating clients since it can get this info from the job's metadata.

This PR also cleans up some log messages by changing their log level to DEBUG.

NOTE: this PR does not change SJ's logic to get job clients from SP via the sync message, due to the large scope of changes. Since there is always only a single SJ for each job, it won't cost much for the SP to process one message from the SJ.

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • Quick tests passed locally by running ./runtest.sh.
  • In-line docstrings updated.
  • Documentation updated.

@yanchengnv yanchengnv changed the title Fixed client sync retry logic to handle race condition Fixed client sync from SP Mar 2, 2025
@yanchengnv yanchengnv requested a review from nvidianz March 2, 2025 19:40
@yanchengnv yanchengnv changed the title Fixed client sync from SP Get job participating clients from Job Meta Mar 2, 2025
@yanchengnv yanchengnv enabled auto-merge (squash) March 3, 2025 17:15
@yanchengnv
Copy link
Collaborator Author

/build

1 similar comment
@yanchengnv
Copy link
Collaborator Author

/build

@yanchengnv yanchengnv merged commit c8536f6 into NVIDIA:main Mar 3, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants