Roy Golan has posted comments on this change. Change subject: WIP Update balancers and add memory based load balancing ......................................................................
Patch Set 1: (2 comments) https://gerrit.ovirt.org/#/c/38189/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VdsCpuUsageComparator.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VdsCpuUsageComparator.java: Line 8: /** Line 9: * Comparator that compares the CPU usage of two hosts, with regard to the number of CPUs each host has and it's Line 10: * strength. Line 11: */ Line 12: public final class VdsCpuUsageComparator implements Comparator<VDS> { thanks for extracting those out. I'd make those static as we don't need a new instance each time. its a waste. Line 13: @Override Line 14: public int compare(VDS o1, VDS o2) { Line 15: return Integer.valueOf(calculateCpuUsage(o1)).compareTo(calculateCpuUsage(o2)); Line 16: } https://gerrit.ovirt.org/#/c/38189/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VmCpuUsageComparator.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/scheduling/utils/VmCpuUsageComparator.java: Line 6: Line 7: /** Line 8: * Comparator that compares the CPU usage of two VMs, with regard to the number of CPUs each VM has. Line 9: */ Line 10: public final class VmCpuUsageComparator implements Comparator<VM> { also make static Line 11: @Override Line 12: public int compare(VM o1, VM o2) { Line 13: return Integer.valueOf(calculateCpuUsage(o1)).compareTo(calculateCpuUsage(o2)); Line 14: } -- To view, visit https://gerrit.ovirt.org/38189 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I1fe13267feca89ab6c8fb9d85656f05930d0b333 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Sivák <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Tomer Saban <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
