-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Orleans 7.x does not support multiple stateless worker grain types with different StatelessWorkerPlacement.MaxLocal
values
#8873
Labels
Comments
ghost
added
the
Needs: triage 🔍
label
Feb 22, 2024
I have noticed that this happens whenever there are different stateless worker grain types with different stateless worker count limits. [StatelessWorker(1)]
public class SingleStatelessWorkerGrain : Grain, ISingleStatelessWorkerGrain
{
}
[StatelessWorker]
public class MultipleStatelessWorkerGrain : Grain, IMultipleStatelessWorkerGrain
{
} It seems that the |
isaachili
changed the title
Stateless worker grains do not respect
Orleans 7.x does not support multiple stateless worker grain types with different Feb 22, 2024
StatelessWorkerAttribute
's maxLocalWorkers
parameter in Orleans 7.xStatelessWorkerPlacement.MaxLocal
values
ReubenBond
added a commit
to ReubenBond/orleans
that referenced
this issue
Feb 27, 2024
… accounted for
ReubenBond
added a commit
to ReubenBond/orleans
that referenced
this issue
Feb 28, 2024
… accounted for
ReubenBond
added a commit
to ReubenBond/orleans
that referenced
this issue
Mar 7, 2024
… accounted for
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We have observed that under load, the value provided to the
maxLocalWorkers
parameter in theStatelessWorkerAttribute
constructor does not get respected at times. In such situations,StatelessWorkerPlacement.MaxLocal
is getting set toDefaultMaxStatelessWorkers
.This behaviour was reproduced on multi-node and single-node clusters alike, whereby the stateless worker is being constrained to a maximum of 1 stateless worker per silo as per the following code:
Whilst debugging Orleans code, we noticed that the initial stateless worker grain gets created via StatelessWorkerGrainContext.cs#L185.
StatelessWorkerGrainContext.CreateWorker(object)
gets invoked a second time, this time by StatelessWorkerGrainContext.cs#L216 due to_workers.Count
being less than_maxWorkers
, which holds a value of 8 (number of logical cores) instead of 1.Furthermore, when the
GrainTypeSharedContext
constructor is invoked, thePlacementStrategy
property is being set to aStatelessWorkerPlacement
instance with aMaxLocal
of 1.The text was updated successfully, but these errors were encountered: