I use the FairSharePolicy to sort the runnableApps in FSLeafQueue. For the comparation of FSAppAttempt, s1Needy and s1Needy must be negtive. So FairSharePolicy will use useToWeightRatio to compare. This algorithm only consider the ResourceUsage of the FSAppAttempt. There is a unreasonable phenomenon: A low ResourceUsage FsAppAttemp with no demand(or request) will be in front of the queue, then skip this chance of assigning container.