> On Aug. 10, 2013, 1:11 p.m., Koushik Das wrote: > > plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java, > > line 663 > > <https://reviews.apache.org/r/13441/diff/1/?file=339183#file339183line663> > > > > CPU weight computation is not considering the number of CPUs in the VM > > but utilization is considering it. Shouldn't both follow the same logic? If > > not can you explain the logic and put a comment in the code for the same. > > > > Also what is logic for multiplying the speed with 0.99?
This is as per the design of xenserver. CPU weight is calculated per VCPU. So whatever the weight we assign Xenserver allocates to each VCPU and cpu cap is per VM. Please refer For CPU Weight: http://blog.xen.org/index.php/2010/08/13/rfc-credit1-make-weight-per-vcpu/ For CPU cap: http://mail-archives.apache.org/mod_mbox/incubator-cloudstack-dev/201206.mbox/%3cb1df26ecc0458748ac97cece2da98d41012f9d61a...@sjcpmailbox01.citrite.net%3E Multiplication with 0.99 is what we follow during vm deployment may be for some overhead calculations, So It should be the same during scale vm also. - Harikrishna ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13441/#review24968 ----------------------------------------------------------- On Aug. 9, 2013, 1 p.m., Harikrishna Patnala wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/13441/ > ----------------------------------------------------------- > > (Updated Aug. 9, 2013, 1 p.m.) > > > Review request for cloudstack and Koushik Das. > > > Bugs: CLOUDSTACK-3850 > > > Repository: cloudstack-git > > > Description > ------- > > CLOUDSTACK-3850: CPU cap should be per VM not per VCPU > > > Diffs > ----- > > > plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java > e100211 > > plugins/hypervisors/xen/src/com/cloud/hypervisor/xen/resource/XenServer56FP1Resource.java > d230be1 > > Diff: https://reviews.apache.org/r/13441/diff/ > > > Testing > ------- > > > Thanks, > > Harikrishna Patnala > >