Hi, the DRF flavors we use in our hierarchical allocator slightly differ between how we identify the role and the framework most under fair share.
In DRF each actual usage is normalized to some “total”. For roles we use the total resources in the cluster (or for quota the total non-revocable resources), see e.g., https://github.com/apache/mesos/blob/bf507a208da3df360294896f083dd163004324aa/src/master/allocator/mesos/hierarchical.cpp#L521-L524. For frameworks in the same role on the other hand we choose to normalize with the allocated resources, see e.g., https://github.com/apache/mesos/blob/bf507a208da3df360294896f083dd163004324aa/src/master/allocator/mesos/hierarchical.cpp#L551. This means that we e.g., need to update the denominators in the framework sorters whenever we made an allocation. These approaches are not equivalent, and I was wondering what the reason for the deviating DRF for frameworks was. It appears to me that by normalizing with the used resources inside a role we somehow bias allocations inside a role against frameworks with “unusual” usage vectors (relative to other frameworks in the same role). We do not seem to document any such intention, and I am also unsure about the usefulness for such a bias in a world with large, possibly deeply nested role trees. More from an aesthetic point of view, the special treatment for frameworks seems in the same role seems to break symmetry (necessitating special treatment), and having to update the denominators in framework sorters on each allocations also seems to potentially introduce extra churn in framework sorter. Does anybody recall why we use a different DRF flavor for frameworks in the same role as opposed to the one used across roles? Cheers, Benjamin