The classical max-min fairness algorithm for resource allocation provides many desirable properties, e.g., Pareto efficiency, strategy-proofness and fairness. This paper builds upon the observation that max-min fairness guarantees these properties under a strong assumption -- user demands being static over time -- and that, for the realistic case of dynamic user demands, max-min fairness loses one or more of these properties. We present Karma, a generalization of max-min fairness for dynamic user demands. The key insight in Karma is to introduce "memory" into max-min fairness -- when allocating resources, Karma takes users' past allocations into account: in each quantum, users donate their unused resources and are assigned credits when other users borrow these resources; Karma carefully orchestrates exchange of credits across users (based on their instantaneous demands, donated resources and borrowed resources), and performs prioritized resource allocation based on users' credits. We prove theoretically that Karma guarantees Pareto efficiency, online strategy-proofness, and optimal fairness for dynamic user demands (without future knowledge of user demands). Empirical evaluations over production workloads show that these properties translate well into practice: Karma is able to reduce disparity in performance across users to a bare minimum while maintaining Pareto-optimal system-wide performance.
翻译:经典的资源分配最大最小公平算法具备诸多理想特性,如帕累托效率、策略抵御性和公平性。本文基于以下观察建立:最大最小公平算法在用户需求随时间保持静态的强假设下能保证这些特性,而对于用户需求动态变化的现实场景,该算法会丢失其中一项或多项特性。我们提出Karma——面向动态用户需求的最大最小公平算法的泛化方案。Karma的核心创新在于为最大最小公平算法引入"记忆"机制:当分配资源时,Karma会考虑用户的历史分配情况——在每个时间量子中,用户捐赠其未使用的资源,并在其他用户借用这些资源时获得信用积分;Karma基于用户的瞬时需求、捐赠资源和借用资源精心协调用户间的信用积分交换,并根据用户信用积分执行优先级资源分配。我们从理论上证明:Karma能在无需未来需求信息的前提下,为动态用户需求保证帕累托效率、在线策略抵御性和最优公平性。基于生产工作负载的实证评估表明,这些特性在实践中转化良好:Karma能将用户间的性能差异降至最低,同时保持全局系统的帕累托最优性能。