'Returns the minimum overload value required to make the ring maximally
dispersed.
The required overload is the largest percentage change of any single
device from its weighted replicanth to its wanted replicanth (note:
under weighted devices have a negative percentage change) to archive
dispersion - that is to say a single device that must be overloaded by
5% is worse than 5 devices in a single tier overloaded by 1%.'

def get_required_overload(self, weighted=None, wanted=None):

    weighted = (weighted or self._build_weighted_replicas_by_tier())
    wanted = (wanted or self._build_wanted_replicas_by_tier())
    max_overload = 0.0
    for dev in self._iter_devs():
        tier = (dev['region'], dev['zone'], dev['ip'], dev['id'])
        if (not dev['weight']):
            if ((tier not in wanted) or (not wanted[tier])):
                continue
            raise exceptions.RingValidationError(('Device    %s    has    zero    weight    and    should    not    want    any    replicas' % (tier,)))
        required = ((wanted[tier] - weighted[tier]) / weighted[tier])
        self.logger.debug('%(tier)s    wants    %(wanted)s    and    is    weighted    for    %(weight)s    so    therefore    requires    %(required)s    overload', {'tier': pretty_dev(dev), 'wanted': wanted[tier], 'weight': weighted[tier], 'required': required})
        if (required > max_overload):
            max_overload = required
    return max_overload
