Resource sharing
Resource sharing refers to the temporary allocation of unowned resources from a “share pool” to a consumer with an unsatisfied demand. You can configure resource sharing for your consumers by setting the share ratio, which specifies the ratio of resources to be allocated from the share pool.
Default behavior—share ratio enforced at leaf level
By default, planned share ratios are enforced at the leaf level of the consumer tree. 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.


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, 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

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.

Best practices
Novice EGO administrators may implement a “silo” model for initial testing, creating resource groups that remain quite distinct and self-contained, and configuring resource plans to exclude the ability to borrow and lend resources between consumers.
By maintaining such a limited model, administrators lose the advantages of EGO’s flexibility to dynamically respond to consumer and client needs and to distribute resources effectively across a cluster. To break down the silo and move to a more distributed sharing model, you must enable lending and borrowing. This can be done by altering the resource plan in a variety of ways, and ranking consumers.
- Configuring resources that are available for sharing: The cluster administrator may set aside a number of resources for all consumers within the consumer tree to share. These unowned resources get distributed throughout the tree according to share entitlements (share ratio).
A best practice to help you better leverage the distribution of resources available for sharing is to interpret the share ratio as a minimum share value. These minimum values are complemented by the maximum share values you must also set. A distribution policy that includes resources available for sharing must always yield actual share values between the minimum and maximum constraints. So long as this remains the primary expectation, the complexities of the actual distribution algorithm do not matter.
- Configuring surplus resources for lending.
Note that the key to effective resource distribution includes more than configuring suitable plans and policies. You must also ensure that there are enough resources distributed to the resource groups for the lend/borrow plans to make a difference. A transition from a silo to a distributed model of resource distribution requires a combination of effective resource plan configuration and the appropriate distribution of resources to resource groups in the tree.