This paper investigates how different resources can be fairly allocated among users that possibly prioritize them differently. We introduce a fairness policy, called Dominant Resource Fairness (DRF), which is an adaptation of max-min fairness from networking to datacenter environments. We show that DRF, unlike other policies which we investigated, satisfies a number of desirable properties that a fair datacenter scheduler should have, including guaranteeing that every user gets 1/N of some resource and that users can relinquish resources without hurting other users' allocations. DRF is also envy-free, incentivizing users to correctly report their resource demand. When compared to other intuitive schedulers, as well as competing ones from microeconomic theory, DRF is more fair.