Scenario: Creating a Resource Plan that Responds Dynamically to Consumer Needs

Goal

In order to break down self-contained resource group “silos”, and instead move to a more distributed sharing model, you need to create an effective resource plan that enables lending and borrowing. Following the steps below, you create a hybrid resource plan that promotes and protects the business objectives of various consumers yet still allows resources to be shared between them over your cluster.

Scenario

You have created useful resource groups, set up a consumer tree that mirrors your business structure, and added various business services to your cluster. You now want to create resource plans for the consumers in your consumer tree. If you are a cluster administrator, you can define a distinct resource plan for a time window of significance for each consumer.

Specifically, you want to create resource plans that ensure the following:

  • Your top-priority consumer (QA) receives the greatest number of resources, has first claim on any unowned resources, and is first in line to borrow available resources if demand is high.

  • Development, Research, and Finance consumers follow QA in priority sequentially, have appropriately adjusted ownership allocations, and have lending and borrowing policies that compliment each other’s business objectives.

  • Research receives extra protection against failures that might occur during a critical back-up window between 2:00 AM and 3:00 AM each day.

  • Finance moves up in priority for the last 3 days of each month during a time of high activity.

You therefore want a resource plan that allows for sharing between these consumers, but that guarantees certain consumers have a higher priority than others in accessing these resources during known peak periods of activity.

At a glance

  1. Why share?

  2. Before you create a resource plan

  3. Create a resource plan with different time intervals

  4. Create and import a distinct resource plan for use at the end of each month

Why share?

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.

Before creating a resource plan, you must first understand its components and capabilities.

Before you create a resource plan

  1. Go to your ManagementHosts resource group and ensure there is at least 1 owned slot allocated to each registered leaf consumer.

    Unless you have at least 6 or 7 owned slots allocated to the ManagementHost resource group, EGO services does not run (there are 6 out-of-box management services installed, each requiring its own slot; if derbydb service was enabled during installation, then there are 7 installed services). If you have other non-EGO services registered, you may require additional allocated slots.

  2. For all consumers (except for those in the ManagementHosts and InternalResourceGroup resource groups), ensure the box Rebalance when time intervals change is checked within individual Consumer Properties dialog boxes.

    This ensures that when your resource plan changes according to set time intervals, that originally configured share ratios, allocations, and lend/borrow policies are reapplied and enforced across all consumer branches in the consumer tree.

  3. Ensure that the resource plans you create apply to consumers that are outside of the ManagementHosts and InternalResourceGroup resource groups (be sure to change resource groups in the Console before you start working on a resource plan).

    To do this, navigate to Consumers > Consumers & Plans > Resource Plan, and then click Resource Groups: ComputeHosts (or equivalent) from the drop-down list.

    This is important so that you do not interrupt services inadvertently when invoking different resource plans with different time intervals. The services within the ManagementHosts and InternalResourceGroup resource groups should run without interference regardless of which policy is applied during a certain time of day.

  4. (Optional). You may wish to work through other related scenarios. For the sake of continuity, some examples are reused in this document.

Create a resource plan with different time intervals

Creating a resource plan can be a complex process. This process has been broken up into 7 major steps that take place in sequence, all within the Resource Plan page of the Platform Management Console.

A simple default resource plan is already in place to adapt for your own purposes. Any changes you make and apply to the resource plan in the Platform Management Console are implemented immediately. Do not apply the changes if you do not wish the changes to be immediate. Export the plan instead, and work on the copy until you are ready to import the updates and apply the changes.

  1. Create a time interval
  2. Set owned slots for leaf consumers
  3. Set lend and borrow policies
  4. Specify share ratios for resource distribution between sibling leaf consumers
  5. Set consumer rank to establish lending priority between sibling leaf consumers
  6. Create a different resource plan for another time interval
  7. Apply or export resource plan

Create a time interval

  1. Navigate to Consumers > Consumers & Plans > Resource Plan.

    If you have never updated or imported a resource plan, your resource plan shows default settings.

  2. If you have not already done so, select the resource group for which you are creating a resource plan (for example, ComputeHosts).

    You do not want to change the resource plan for ManagementHosts or InternalResourceGroup (the resource groups where EGO services reside). If you are working from a default plan, select Resource Groups: ComputeHosts (or an equivalent resource group you may already have created) from the drop-down list at the top of the resource plan.

  3. Select Time Intervals and Settings > Insert a Time Interval.
  4. Select the start time 02:00 and the end time 03:00. Click Insert.

    A confirmation dialog opens.

  5. Click OK to continue.

    The plan now contains the following time intervals: 00:00-02:00, 02:00-03:00, and 03:00-24:00.

You have created the time window during which the consumer named Research performs critical back-ups each day. Separate resource plans need to be created for each of the three time intervals. These resource plans automatically get applied during these times.

Continue creating your resource plan by assigning slots to consumers.

Set owned slots for leaf consumers

  1. Click Expand All to expand the entire consumer tree.

    You only see those consumer branches that specify as part of their consumer properties the resource group you are currently creating a resource plan for (in this example, ComputeHosts).

  2. Select Time Intervals and Settings > Show Advanced Settings to display advanced settings and policy configuration options for the resource group.
  3. For the first time interval only (00:00-02:00), set the owned slots for each leaf consumer in the QA consumer branch.

    Be sure to allocate all available resources. When all resources are allocated, the Balance at the bottom of the Ownership section is 0.

    For example, if you have 10 owned QA slots to distribute, you may want to distribute 5 of them to the “Production Testing” consumer, 3 to the “New Venture Testing” consumer, and 2 to the “Iteration Testing” consumer (see the graphic below). If one of your consumers has sub-consumers, ensure that you distribute owned resources to them as well. For example, if the “New Venture Testing” consumer has 2 sub-consumers, you might assign 2 of the 3 available slots to the “Main Testing” sub-consumer, and 1 slot to the “Subsidiary Testing” sub-consumer.

    Note:

    Keep in mind that the resource plan is hierarchical in nature; you cannot allocate more resources to sub-consumers than the consumer above it owns. Be sure to distribute all available resources as far down a consumer branch as possible to its leaf consumers.

Continue creating your resource plan by configuring consumer lending and borrowing policies.

Set lend and borrow policies

Lending allows a consumer’s unused slots to be used by other consumers. Borrowing lets a consumer use unowned or lent slots when they are available.

  1. For the first time interval only (00:00-02:00), select the options to Lend and Borrow for each leaf consumer in the QA branch that has something registered to it.

    In our example, the leaf consumers (consumers with no descendents) in the QA branch include the following:

    • Production Testing

    • Iteration Testing

    • Main Testing

    • Subsidiary Testing

  2. Specify the maximum number of slots you would like each consumer in the QA branch to lend.

    The lend limit number is a maximum, absolute number of slots to be lent out during periods of non-use. The remainder are never lent, even if they are not being used. If you leave the field blank, all slots can be lent out.

    For example, beside the Lend field for the leaf consumer Production Testing, click Details. From the Lend Details dialog box, enter the number 5 in the Cumulative lend limit field (or leave the field blank) to indicate that this consumer is willing to lend out all 5 owned slots during periods of non-use. If you choose to make only 4 slots available for lending instead of all 5, this consumer always retains 1 resource that can never be borrowed.

    In our example, leave all lend limit fields blank for all the leaf consumers in the QA branch. This promotes a more distributed sharing model for your cluster.

  3. Specify particular consumers to lend to.
    1. For each leaf consumer in the QA branch that has lending enabled, click Details beside the consumer’s Lend | Limit box.

      For example, click Details for the consumer Production Testing.

      The Lend Details dialog box opens for this consumer.

    2. Check the boxes beside those consumers Production Testing lends to. In our example, choose only consumers within the QA branch of the consumer tree.

      Tip: It is useful to indicate which consumers to lend resources to if you want to ensure that unused resources are only lent to consumers within a specific consumer branch.

    3. Click Apply, and then Close.
    4. Repeat these steps for the remaining leaf consumers in the QA branch.
  4. Specify the maximum number of slots a consumer can borrow from lending leaf consumers in the QA branch.

    This number is the maximum, absolute number of slots that can ever be borrowed by a consumer. If you leave the field blank, borrowing is limited only by the amount of resources available in the cluster. For our example, do not specify limits—leave the fields blank.

    For example, beside the Borrow check box for the leaf consumer Production Testing, leave the Limit field blank. This allows the Production Testing consumer (within the highest priority QA consumer branch) to borrow as many resources as needed to meet its resource demands.

  5. Specify particular consumers that you want each consumer to borrow from, along with the order in which they borrow from those consumers.
    1. For each leaf consumer in the QA branch that has borrowing enabled, click Details beside the consumer’s Borrow | Limit box.

      For example, click Details for the consumer Production Testing.

      The Borrow Details: Production Testing dialog box opens.

    2. Check the boxes beside those consumers Production Testing can borrow from. In our example, choose all consumers that have lending enabled within the consumer tree (even those from other consumer branches).

      Tip: It is useful to indicate which consumers to borrow resources from if you want to ensure that unused resources are only borrowed from consumers within a specific consumer branch.

    3. Use the Preference Order column to specify the order in which you want to borrow from specific consumers.

      The number 1 indicates that this consumer is your first choice to borrow from. Do not repeat any numbers.

      In our example, indicate a higher borrowing order for consumers in other consumer branches (outside of the QA consumer branch). This helps to ensure that your highest priority consumer (Production Testing) within your highest priority business process (QA) can borrow from as many consumers as possible during periods of peak activity.

      Set your borrowing order in this way:

      • QA

        • Production Testing (not available for ordering)

        • New Venture Testing

          • Main Testing: Preference Order 14

          • Subsidiary Testing: Preference Order 13

        • Iteration Testing: 12

      • Development

        • New Ventures

          • Hollywood: Preference Order 11

          • Jims Group: Preference Order 10

        • General: Preference Order 9

        • Project Old Standby

          • New Functions: Preference Order 8

          • Functional Dev: Preference Order 7

          • Iterations: Preference Order 6

      • Research

        • Data Flow: Preference Order 5

        • Storage: Preference Order 4

      • Finance

        • Stocks and Bonds

          • Disaster Recovery: Preference Order 3

          • General: Preference Order 2

        • Payroll: Preference Order 1

    4. Click Apply, and then Close.
    5. Repeat these steps for the remaining leaf consumers in the QA branch.

Continue creating your resource plan by setting share ratios for consumers on the same branch of the consumer tree.

Specify share ratios for resource distribution between sibling leaf consumers

The share ratio determines the minimum number of resources to distribute to a leaf consumer in cases where there is competition between siblings.

In our example, a set share ratio applies between the leaf consumers Main Testing and Subsidiary Testing (because they are sibling leaf consumers with the same parent on the QA branch), but does not apply between Main Testing and Iteration Testing (because these are leaf consumers on different levels of the QA branch and not siblings).

  1. Check the Share Ratio box for the leaf consumers Main Testing and Subsidiary Testing in the QA branch, and enter the share ratio 1 for each of them.

    This ensures that both consumers share available surplus resources equally.

  2. Check the Share Ratio box for the consumers Production Testing, New Venture Testing, and Iteration Testing, and then enter the share ratio of 2:1:1 respectively.

    This ensures that the higher priority consumer Production Testing receives twice as many unused resources as either of the leaf consumers New Venture Testing and Iteration Testing from the same branch. New Venture Testing shares resources equally with Iteration Testing.

    Furthermore, New Venture Testing passes on the shared resources it receives directly to its leaf consumers.

  3. Indicate a sharing limit for leaf consumers.

    By default, a leaf consumer who is first in line to borrow (either because it is the first one to express a demand, or because of its higher consumer rank), can borrow all the resources available for sharing if it has enough demand. If you want to limit the amount of resources a consumer receives through borrowing, you can indicate a limit in the Sharing Limit field. The borrowing limit is expressed as a numeric quantity.

    In our example, do not specify a borrowing limit for leaf consumers in the QA branch. Because they are high priority consumers, you want to ensure that their demands for resources are fully satisfied in order to fulfill business objectives.

    Note: If the consumer owns resources in addition to borrowing resources, the maximum distribution to the consumer is the borrowing limit plus the ownership.

  4. Repeat these steps for the other consumer branches, establishing an equal share ratio between sibling leaf consumers, and setting sharing limits for lower priority consumers.

Continue creating your resource plan by assigning consumer rank.

Set consumer rank to establish lending priority between sibling leaf consumers

If you have critical workload units to run, you can ensure resources are available by setting a high priority to a consumer.

  1. Under Ownership, rank consumers within the QA branch.

    Specify any positive whole number in the Consumer Rank field, where 1 is the highest priority. Priority settings are relative to one another within the resource group. If you leave the priority blank, that consumer has no priority over any other consumer (it does not form part of any consumer ordering/sequencing).

    Note: Setting a high priority to all consumers effectively nullifies any advantage. Only set consumer rank high for selected consumers.

    In our example, give Production Testing a high ranking value, such as 50. Rank other leaf consumers in the QA branch high as well, although with a lower value than you gave to Production Testing.

  2. Do this for other consumer branches, assigning decreasing consumer rank values as you move down the consumer tree.

    For low priority consumer branches, such as Finance, you can choose to leave the Consumer Rank field blank.

    Note:

    Plan the ranking of your consumers knowing that resources are reclaimed based on their rank; those leaf consumers with a lower consumer rank are reclaimed before consumers with a higher rank.

Continue creating your resource plan by configuring another resource plan for the next time interval. If you wish to export the plan at this time and continue creating it later, skip to the topic Apply or export resource plan.

Create a different resource plan for another time interval

At this point you have created a complete resource plan for the time interval 00:00-02:00. Your top-priority consumer branch (QA) and it’s sub-consumers are set to receive the greatest number of available resources, have first claim on any unowned resources, and are first in line to borrow available resources if demand is high.

Between 02:00-03:00, a traditionally lower-priority consumer (Research) requires immediate access to more resources in case it experiences host failure during this critical time window. A new resource plan is therefore required during this time interval that favors the Research branch in terms of resource allocation and borrowing policies.

  1. When setting owned slots for leaf consumers in the Research consumer branch, ensure all resources are allocated to leaf consumers.
  2. When setting lend and borrow policies for the Research consumer branch, do the following:
    1. For the Research consumer branch, enable lending.
    2. Specify that leaf consumers in the Research branch only lend to each other, not to other consumers from other branches.
    3. Enable borrowing with no limits.
    4. For consumers from other branches, specify the leaf consumers from the Research branch as approved borrowers.
    5. For consumers from other branches that are specifying the order in which they want to borrow from other consumers, give the leaf consumers from the Research branch a high numerical value (to indicate they are not a number 1 choice to borrow from).
  3. When setting the share ratio for the Research branch, specify an equal share ratio to all leaf consumers (enter the value 1 in all fields).
  4. When setting the consumer rank for each consumer, assign lower numerical values to consumers from the Research consumer branch.

    The lower the number, the higher the rank; therefore, a “1” indicates the highest ranking.

You have now created two resource plans: The first plan configures the QA consumer branch to be a top-priority consumer who qualifies to receive the greatest number of resources, has first claim on any unowned resources, and is first in line to borrow available resources if demand is high. The second plan ensures that the Research consumer branch receives extra protection against failures during a critical back-up window each day.

You must create a third resource plan for the final time interval, 03:00-24:00. Mirror the same plan that was created for the original time windows 00:00-02:00.

You must also repeat these steps for any other resource groups you have created. (Do not alter the plan for the ManagementHosts resource group.) To switch between resource groups, use the drop down list above the plan. Make sure you apply changes before switching to a different resource group.

Apply or export resource plan

Any changes you make and apply to the resource plan in the Platform Management Console are implemented immediately.

  1. Click Apply to save and make the current settings active.

    If you do not want to make the current changes active, export the resource plan instead.

  2. If you do not want to immediately apply the resource plan you have created, you can export it for later use.
    1. From Consumers > Consumers & Plans > Resource Plan, go to the bottom of the page and click Export.
    2. Save your resource plan locally.

      You may want to give the XML file a unique name including date or plan specifics so that you can import the plan of your choice quickly and easily at a later time.

    Note:

    Do not change your tree structure while the plan is exported or you will not be able to import the plan again.

Once you apply the resource plan, it becomes active. You can export this plan and import it again as needed if you want it to apply to specific days of the week only. You can create as many resource plans as you want and import them as needed for a quick change in your distribution.

Create and import a distinct resource plan for use at the end of each month

Create a resource plan that favors the consumers in the Finance branch of your consumer tree, and ranks them with a high consumer priority. Ensure that the critical backup time window from 02:00-03:00 is preserved to protect the consumers in the Research branch.

The Platform Management Console stores only your active resource plan. You can, however, import and apply a previously created resource plan (saved in XML format).

For the last three days of each month, the consumers in your Finance branch move up in priority during a time of high activity for them. You need to import and apply and different resource plan for this time.

  1. Ensure that a resource plan exists (and was exported) that favors the consumers in the Finance branch of your consumer tree, and ranks them with a high consumer priority.
  2. Ensure that the resource plan you import has an identical tree structure to the active resource plan.

    It is ok if the time intervals are different.

  3. Click on your cluster name in your tree.
  4. Click Consumers > Consumers & Plans > Resource Plan.

    If you do not see Resource Plan, make sure you are at the top of your tree.

  5. At the bottom of the page, click Import.

    The Import a resource plan (XML) dialog displays.

  6. Browse for the location of the XML resource plan you wish to import.
  7. Click Import.

    Importing a resource plan makes it the active plan.

You have imported a resource plan and made it the active plan. All distribution of resources take effect immediately.