erigones / esdc-ce

Danube Cloud :: Community Edition
https://danubecloud.org
Apache License 2.0
127 stars 28 forks source link

LX or Sunos Zone Vcpu restriction #296

Closed marcheschi closed 6 years ago

marcheschi commented 6 years ago

Hi When I create an LX or Sunos Zone on smartos I'm not restricted to the number of cpu, because it use a shared model. The only parameters that are important are amount of RAM and Disk quota. When I try to create such zone with Danube it force me to choose the number of VCPU. I think that for LX or Sunos this restriction have to be disabled . Thank you Paolo

dn0 commented 6 years ago

@marcheschi Since you've already used SmartOS, I can totally understand your confusion here. We're usually trying to keep things consistent between zones and KVMs. So we've kept the vCPUs attribute also for SunOS and LX zones, which internally configures the cpu_cap property on SmartOS. The exact calculation is visible here: https://github.com/erigones/esdc-ce/blob/master/vms/models/vm.py#L1696

For SunOS and LX zones the vCPUs parameter usually* translates to cpu_cap like this:

* The calculation depends on the VMS_VM_CPU_BURST_RATIO setting, which is set to 1.0 by default.

marcheschi commented 6 years ago

Thank you for your fast reply . I understand that the CPU cap is the maximum number of CPUs that a provisioned machine can use. But one of the feature of solaris kernel and Native zones is the fair share scheduler (FSS). Is it possible to remove the cpu_cap for native zones in order to allocate more cpu power when other zones does not need it ? In this way I can allocate more resource to a Zone when the others are unoccupied, for example I can schedule a big research computation at night. Thank you Paolo

dn0 commented 6 years ago

@marcheschi OK, I can see your point. Currently, your best option is to set the VM vCPUs parameter to a very high number. But first, you have to set the cpu_coefficient on the compute node to a high value. This way you can set a very high cpu_cap on any VM.

Lets leave this issue opened for further discussion. I can imagine that we could remove cpu_cap for SunOS and LX zones when the vcpus parameter is set to an empty value. But we have to think of all implications, especially when it comes to managing multiple virtual datacenters in Danube Cloud. Maybe it would be available only after switching some setting...

marcheschi commented 6 years ago

Hi, Thank you for your reply. One of the reason for our decision to go for Smartos was this possibility to exploit the real power of a server, and this is one of the real differences between other big actors in virtualization technologies. Lx and native zones are the election virtualization choice for web, java, python, node, ... applications, where they use only standard and multiplatform softwares. We try to use kvm only for legacy software (i.e. Windows, or oracle DB), for all the others we use native or LX. This choice permits us to use either INTEL or AMD CPUs, and to pack multiple zones in fews hardwares. I do not think it is necessary to upset the organization of the Danubecloud platform, I think it's a good idea to create a flag to use this feature.

Thank you Paolo

dn0 commented 6 years ago

In 3.0, it will be possible to set vcpus to 0 for SunOS and LX zones, which will disable cpu_cap. For this to work the VMS_VM_CPU_CAP_REQUIRED setting was added in #332