Hudratronium commented on issue #6744: URL: https://github.com/apache/cloudstack/issues/6744#issuecomment-1250042449
> The bigger problem is really that this 100 core host has maybe 200GHz worth of CPU to allocate, and with 1MHz CPU offerings cloudstack calculates that you have only scheduled 100Mhz to it! The allocators will quickly overload the system with more VMs. And the whole concept of CPUs having differing speeds is thrown out if we just map 1 CPU to 1 MHz. I currently can't see how this might happen as the shares aren't the only factor for the allocation decision. Each of the compute offerings will at least block 1 core. So after deploying theoretical 100 machines using the 1Core / 1Mhz offering, the host is "full". Therefore one might check the global settings for `cpu.overprovisiong.factor`. The mapping of `CPU (in MHz)` works quiet well. Which is quiet good idea at first as long as n.Cores * CPU (in MHz) !> 262144. Which means for the vm you would like to deploy it shouldn't have more then 262144MHz allocated - which i guess could be sufficent for most of usecases ;-) I can see why a "10000" as a reference value won't be sufficent here as @correajl wrote. In my deployment i have a base CPU Freq. of 2650. So i could only deploy a 3 core VM with 2650MHz. That isn't that much.... Reagarding the use of the value 'shares' for libvirt: I don't think that the approach will work out as the overall value for shares can be in theoy '262144' for each Domain. Which means each Domain will have the same CPU time. '262144' isn't representing the acutal availeable CPU time, it's used to generate a 'proportional **weighted** share'. Not weighting the actual availeable ressources, more the share between the different Domains. A short example based on the libvirt docs: Domain A - `shares` = 1024 Domain B - `shares` = 2048 Domain C - `shares` = 4096 Domain B shall have 2x the CPU time as Domain A. Domain C shall have 4x the CPU time as Domain A and 2x CPU Time as Domain B. To allocate the CPU time, one then needs to sum the factors to get to the number of "Slots" and then calculate the actual cpu time. so for the example: 1 (Domain A) + 2 (Domain B) + 4 (Domain C) = 7 Slots And then: Availeable CPU time / 7 Slots * Factor for each Domain = CPU Time for each Domain (Using '100s' represeinting the overall availeable CPU time for simplification) 100s / 7 = 14,28s Domain A: 14,28 * 1 = 14,28s Domain B: 14,28 * 2 = 28,56s Domain C: 14,28 * 4 = 57,12s This works quiet well with the `CPU (in MHz)` mapped to the value of `shares` in the Domain XML - as written above - the `n.Cores * CPU (in MHz) !> 262144`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
