You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ni...@apache.org on 2013/12/04 23:10:40 UTC

git commit: updated refs/heads/4.3 to e85334f

Updated Branches:
  refs/heads/4.3 6fa79efa9 -> e85334ff5


CLOUDSTACK-5352:
CPU cap calculated incorrectly for VMs on XenServer hosts. It should not be limited by the overprovisioning and should set the cap as service offering


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/e85334ff
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/e85334ff
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/e85334ff

Branch: refs/heads/4.3
Commit: e85334ff515b6e640d61666998a08774ddcfb9f3
Parents: 6fa79ef
Author: Nitin Mehta <ni...@citrix.com>
Authored: Wed Dec 4 14:10:28 2013 -0800
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Wed Dec 4 14:10:28 2013 -0800

----------------------------------------------------------------------
 .../src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/e85334ff/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
index 7fa0aad..f77c149 100644
--- a/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
+++ b/plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java
@@ -1337,7 +1337,7 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
 
             if (vmSpec.getLimitCpuUse()) {
                 // CPU cap is per VM, so need to assign cap based on the number of vcpus
-                utilization = (int) ((speed * 0.99 * vmSpec.getCpus()) / _host.speed * 100);
+                utilization = (int) ((vmSpec.getMaxSpeed() * 0.99 * vmSpec.getCpus()) / _host.speed * 100);
             }
 
             vcpuParams.put("weight", Integer.toString(cpuWeight));