apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.83k stars 1.07k forks source link

CPU overprovisioning factor doesn't seem to work #9303

Open tdtmusic2 opened 5 days ago

tdtmusic2 commented 5 days ago
ISSUE TYPE
COMPONENT NAME
CPU overprovisioning
CLOUDSTACK VERSION
4.19.0.1
CONFIGURATION
OS / ENVIRONMENT
SUMMARY

Setting the overprovisioning factor on a cluster does not seem to work as expected.

STEPS TO REPRODUCE
Set the overprovisioning factor on the cluster to 1
Try to create vms totaling a higher number of cpus than the actual number the host has
EXPECTED RESULTS
Cloudstack should not let me create new vms with offerings that exceed the number of actual cpus.
ACTUAL RESULTS
I could create a new vm without any issues.

If we follow the documentation, setting a value of 1 to the cpu overprovisioning factor of the cluster should only let me create vms totaling the actual ammount of cpus of the host, not more. So if the host has 64 cpus (hyperthreading enabled), I shouldn't be able to create, let's say, 2 vms with 40 cpus each, yet I can, and the dashboard reflects this, showing more than 100% cpus allocated. I don't know if this is expected behavior or I'm supposed to do something more than just setting that value, what I am trying to do is limit the availability of the host cpus to the actual, real, number.

boring-cyborg[bot] commented 5 days ago

Thanks for opening your first issue here! Be sure to follow the issue template!

rajujith commented 4 days ago

@tdtmusic2
If you have a single host with 64 vCPUs of 2000 MHz clock speed and you set CPU over the provisioning value of 1 at the cluster, cloudstack will calculate the total CPU capacity as 64 2000 1 = 128000. Cloudstack will allow you to deploy instances as long as their vCPU count* CPU MHZz value in the offering is less than the total (remaining capacity )value above.