> On March 16, 2017, 6:54 a.m., Jay Guo wrote: > > What should be the correct behavior for following case: > > - parent role `/a` is quota'd with `cpus:2;mem:1024` > > - child role `/a/b` is quota'd with `cpus:1;mem:512` > > - `Framework1` subscribes to role `/a` > > - `Framework2` subscribes to role `/a/b` > > > > From my understanding: > > - `cpus:1;mem:512` should be offered to `Framework2` > > - remaining `cpus:1;mem:512` should be fairly shared by two frameworks, > > resulting in `cpus:0.5;mem:256` for `Framework1` and `cpus:1.5;mem:768` for > > `Framework2`, since virtual role (which `Framework1` subscribes to) always > > has default quota of zero. > > > > Am I missing something? > > > > Another thought is that we should document the correct way to set quota for > > hierarchical roles (always set quota for parent and then children). > > Jay Guo wrote: > My question is that how to quota an internal node, if virtual node always > has zero quota.
Hi Jay. We're referring to that scenario as "quota delegation". In the current RR chain, the additional `cpus:1;mem:512` will _only_ be offered to `Framework1`. We (probably) want to change this behavior so that these resources are fair-shared among all the roles in the `a` subtree, but that behavior is not implemented yet. This behavior isn't specific to virtual leaf nodes as such. I added an extra test (`HierarchicalAllocatorTest.NestedRoleQuotaAllocateToParent`) to https://reviews.apache.org/r/57254/ to cover this case more explicitly. Let me know if that makes sense! Neil - Neil ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/57167/#review169098 ----------------------------------------------------------- On March 16, 2017, 4:53 p.m., Neil Conway wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/57167/ > ----------------------------------------------------------- > > (Updated March 16, 2017, 4:53 p.m.) > > > Review request for mesos and Michael Park. > > > Repository: mesos > > > Description > ------- > > The quota'd resources for a nested role are "included" within the > quota'd resources for that role's parent. Hence, the quota of a node > must always be greater than or equal to the sum of the quota'd resources > of that role's children. > > When creating and removing quota, we must ensure that this invariant is > not violated. > > When computing the cluster capacity heuristic, we must ensure that we do > not "double-count" quota'd resources: e.g., if the cluster has a total > capacity of 100 CPUs, role "x" has a quota guarantee of 80 CPUs, and > role "x/y" has a quota guarantee of 40 CPUs, this does NOT violate the > cluster capacity heuristic. > > > Diffs > ----- > > src/master/quota_handler.cpp 36ea1acca47014b2fb7a3b597b857c8ec9e2ab67 > src/tests/hierarchical_allocator_tests.cpp > dce619ec49db480685deb1bf8f7faeebe02e25b5 > src/tests/master_quota_tests.cpp e418f22ea1773f4356ced44b8d57a80e826c8837 > > > Diff: https://reviews.apache.org/r/57167/diff/5/ > > > Testing > ------- > > `make check` > > > Thanks, > > Neil Conway > >