• Iustin Pop's avatar
    Temporary fix for hspace's NPU calculation · 5f3b040a
    Iustin Pop authored
    hspace computes the NPU (normalised CPU units) via the
    (used|pool|avail) VCPU divided by the (currently cluster-wide) max
    However, in the future we'll have variable vcpu_ratios, so we can't
    the calculation as such. We temporarily change to computing the
    average vcpu_ratio across the cluster, however long-term this needs to
    be improved, as ∑ (Vi/Pi) ≠ ∑ Vi / ∑ Pi. In the meantime we implement
    this patch to remove the use of a global mcpu variable.
    Signed-off-by: default avatarIustin Pop <iustin@google.com>
    Reviewed-by: default avatarRené Nussbaumer <rn@google.com>
Hspace.hs 17.1 KB