Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

The objective of fine-grained scaling (FGS) is to bring elasticity of resources between Myriad/, YARN, and other Mesos frameworks.  The concept is to allow YARN to take With fine-grained scaling, YARN takes resource offers from Mesos , run and runs enough containers (YARN tasks) that the offers can hold and release the resources back to Mesos once the containers finish.

  • Node Managers that register with RM the Resource Manager with (0 memory, 0 cpuCPU) are eligible for fine-grained scaling, that is, Myriad expands /and shrinks the capacity of such NMs the Node Managers with the resources offered by Mesos. Further, Myriad ensures that YARN containers will be are launched on such NMs the Node Managers only if Mesos offers enough resources on the slave nodes running those NMsNode Managers.
  • A new ** zero ** profile is defined in the Myriad configuration file, myriad-config-default.yml file , to help admins launch NMs with (0mem,0cpuadministrators launch Node Managers with (0 memory, 0 CPU) capacities using the xxx.
  • Node Managers that register with RM with Resource Manager with more than than (0 memmemory, 0 cpuCPU) are not eligible for FGSfine-grained scaling. For example, Myriad will not expand /and shrink the capacity of such NMs. These NMs the Node Managers. These Node Managers are typically launched with a low/, medium/, or high profile.

Fine-grained Scaling Behavior

  • Admin Administrators launches Node Managers via Myriad Cluster API with ** zero ** capacities.
  • The Node Managers report ** zero ** capacities to the Resource Manager upon registration.
  • A user submits an application to YARN (for e.g. example, a MapReduce job).
  • The application is added to RMthe Resource Manager's scheduling pipeline. However, YARN scheduler (for e.g. FairShareScheduler) will not allocate any application containers on the ** zero ** profile Node Managers.
  • If there are other Node Managers that were registered with RM with Resource Manager using non-zero capacities (low/medium/high profiles), some containers might be allocated for those NMs those Node Managers depending on their free capacity.
  • Myriad subsequently receives resource offers from Mesos for slave nodes running ** zero ** profile NMsNode Managers.
  • The offered resources are projected to YARN's scheduler as "available capacity" of the ** zero ** profile Node Manager. For example, if Mesos offers (10G memory, 4CPU) for a given node, then the capacity of the **zero** profile NM zero profile Node Managers running on that node increases to (10G memory, 4CPU4 CPU).
  • The YARN scheduler now goes ahead and allocates a few containers for the ** zero ** profile Node Managers.
  • For each allocated container, Myriad spins up a " placeholder " Mesos task that holds on to Mesos resources as long as the corresponding YARN container is alive. In reality, a bunch of "placeholder" tasks are launched in a single shot, corresponding to a bunch of containers YARN allocates.)
  • NMs become Node Managers become aware of container allocations via YARN's HB HBase mechanism. Myriad ensures that NMs that Node Managers are made aware of container allocations only after the corresponding " placeholder " Mesos tasks are launched.
  • When NMs report to RM When Node Managers report to Resource Manager that some of the containers have " finished", Myriad sends out " finished " status updates to Mesos for the corresponding " placeholder " tasks.
  • Mesos takes back the resources from Myriad that were held using " placeholder " tasks upon receiving the " finished " status updates.

Trying out Fine-grained Scaling

  • Spin up Resource Manager with " Myriad Scheduler " plugged into it.
  • Flexup a few NMs few Node Managers using Myriad Cluster API with zero profile:

...

  • The zero profile Node Managers advertise ** zero ** resources to Resource Manager (RM's "Nodes" UI should show this).
  • Submit a M/R MapReduce job to the Resource Manager.
  • When Mesos offers resources to Myriad, the Mesos UI should show " placeholder " mesos tasks (prefixed with "yarn_") for each yarn container allocated using those offers.
  • The RMResource Manager's UI should show these containers allocated to the **zero** profile NM zero profile Node Manager nodes.
  • The placeholder mesos tasks should finish as and when the YARN containers finish.
  • The job should finish successfully (although some NMs some Node Managers were originally launched with 0 capacities).

...