Add self kill when controller no longer messages#2699
Open
dulinriley wants to merge 1 commit intometa-pytorch:mainfrom
Open
Add self kill when controller no longer messages#2699dulinriley wants to merge 1 commit intometa-pytorch:mainfrom
dulinriley wants to merge 1 commit intometa-pytorch:mainfrom
Conversation
Summary: Fixes: meta-pytorch#2198 One of the principles of ownership we want to maintain in monarch is that if the owner of a resource (meshes of hosts, procs, actors) is not alive, that all of the resources it owned are also not alive. This should include if the owner hits a hard failure that prevents it from running any cleanup. Before this change, we didn't have that guarantee, an actor would keep running if its owner went away, as long as the actor didn't message the owner. This change tracks every time a GetState message is received by a ProcMeshAgent, and tracks which controller sent it. We use this information to infer the controller is alive and well. We use a new KeepaliveGetState message which is the same as a GetState but has an explicit side effect. Only ProcMeshAgent uses this for actors at the moment, but we will expand to cover procs and hosts too. Benefits of this change: * Actors might be using resources like CPU, memory, or GPUs that are no longer needed and can be recovered. * If you disconnect the client, all of the actors it spawned will shut themselves down. And then any resources those actors spawned will also shut themselves down recursively. You don't need to run any special cleanup function on the client. This feature is hidden behind a flag, and this flag defaults to off. It may have unexpected issues when we start having actors stop themselves, so we want to test this thoroughly. Differential Revision: D92726630
|
@dulinriley has exported this pull request. If you are a Meta employee, you can view the originating Diff in D92726630. |
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.
Summary:
Fixes: #2198
One of the principles of ownership we want to maintain in monarch is that if the owner of
a resource (meshes of hosts, procs, actors) is not alive, that all of the resources it owned
are also not alive. This should include if the owner hits a hard failure that prevents it from
running any cleanup.
Before this change, we didn't have that guarantee, an actor would keep running if its owner
went away, as long as the actor didn't message the owner.
This change tracks every time a GetState message is received by a ProcMeshAgent, and tracks
which controller sent it. We use this information to infer the controller is alive and well.
We use a new KeepaliveGetState message which is the same as a GetState but has an explicit
side effect. Only ProcMeshAgent uses this for actors at the moment, but we will expand to cover
procs and hosts too.
Benefits of this change:
longer needed and can be recovered.
will shut themselves down. And then any resources those actors spawned will also shut
themselves down recursively. You don't need to run any special cleanup function on the client.
This feature is hidden behind a flag, and this flag defaults to off. It may have unexpected issues
when we start having actors stop themselves, so we want to test this thoroughly.
Differential Revision: D92726630