Share ratio behavior and enforcement

Sharing refers to the temporary allocation of unowned resources from a “share pool” to a consumer with an unsatisfied demand. Behavior of how these resources are distributed to consumers can be configured.

Default behavior—share ratio enforced at leaf level

Distribution model

By default, planned share ratios are enforced at the leaf level. This means that existing share policies guarantee that each application (registered at a leaf level) receives its planned or “deserved” number of resources when demand is demonstrated. If an application does not have sufficient demand to warrant receiving all its deserved resources, the unused resources are distributed to all consumer branches and filtered down to leaf consumers as per their relative share ratios.

In the following sample resource distribution model, all applications (registered to leaf consumers) are configured with equal share ratios; each leaf consumer has a 1:1 share of the resources distributed to its parent (top-level consumer from the same branch). Assuming all applications have the same demand, all receive the same number of resources.
Building on the sample resource distribution model above, if one of the applications no longer demonstrates a resource demand, its “deserved” resources are distributed to other leaf consumers in the tree according to their configured share ratios (in this case, the share ratios are equal). This is the default behavior.

Reclaim behavior

If reclaim is triggered, a leaf consumer takes back its “deserved” number of resources in use by other consumers, up to its planned share. For example, if a leaf resource is experiencing an unmet demand, then it reclaims resources directly from another leaf consumer who is using more than its planned share of resources.

The first leaf consumer reclaims without consideration of the needs or planned share ratio of the second leaf consumer’s branch. The first leaf consumer does not care if the consumer branch it reclaims from falls below the branch’s “deserved” number of resources.

Reconfigured behavior—share ratio enforced at parent level

Distribution model

EGO can be configured so that consumers’ share ratios are enforced at the parent level instead of at the leaf level. This means that if one of the applications no longer demonstrates a resource demand, its “deserved” resources are distributed first to its siblings (other leaf consumers with registered applications within the same consumer branch) experiencing an unmet demand, and then to other leaf consumers in the tree.

Reclaim behavior

By enforcing share ratios at the parent level, a consumer branch’s “deserved” number of resources is considered in cases where reclaim is triggered. Resources are no longer reclaimed directly from a leaf consumer, but are instead reclaimed from the top-level consumer (parent). A parent only releases shared resources if it does not cause unmet demand in its own leaf consumers; if there is demand in its own branch, a parent does not release more resources than its “deserved” share requires.