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

grain distribution in silo #3336

Closed
balakannanmca opened this issue Aug 23, 2017 · 3 comments
Closed

grain distribution in silo #3336

balakannanmca opened this issue Aug 23, 2017 · 3 comments
Labels
Milestone

Comments

@balakannanmca
Copy link

balakannanmca commented Aug 23, 2017

Cloud service is running with four instances. In cloud service starting, one or two instances are taking some time start. In that time, grains activated in active cloud service instances.
So grains didn't distributed equally in silos. One silo was fully loaded. Other one was free.

How can i ensure that grain distributed equally in silos?

@sergeybykov
Copy link
Contributor

When new silos join a cluster, there is no forced redistribution of already activated grains. Only new activation get distributed across all silos. Over time, as new grains get activated and idle ones get collected, you'll reach a balanced distribution across all silos.

You can choose to add a [ActivationCountBasedPlacement] attribute to your grain classes to expedite balancing. It makes all new activations to go to silos with lower counts of grains. There's a danger with that though of overloading the newly started silos by putting a disproportional share of new, and hence actively used, grains to a small number of newly joined silos and overloading them. That's why the default placement strategy is more conservative.

@sergeybykov sergeybykov added this to the Triage milestone Aug 23, 2017
@elqueffo
Copy link
Contributor

Is there a way to access activation counts per silo of a grain? This way the grain could check "balance" and decide to DeactivateOnIdle itself to be relocated.

@yevhen
Copy link
Contributor

yevhen commented Sep 1, 2017

Is there a way to access activation counts per silo of a grain? This way the grain could check "balance" and decide to DeactivateOnIdle itself to be relocated.

👍 Will save us some additional lines of code. Smth like ManagementGrain.GetActivationCount(Silo.CurrentSiloName, typeof(IGrain))

@ghost ghost locked as resolved and limited conversation to collaborators Sep 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants