Questions about RESERVED_MEM and RESERVED_CPU (Opennebula 4.8.0)

Started from 4.6, HYPERVISOR_MEM is replaced by RESERVED_MEM (and RESERVED_CPU). As I did not find detailed documentation about how to use these two attributes. I would like to ask questions here –

  1. Is the unit of RESERVED_MEM “KB”? e.g. 20000 means 20Mb of RAM
  2. Both cluster and individual host accept these two new parameters. Which one is in higher priority? If “RESERVED_MEM” settings are on both cluster and a host, which one will be effective? Seems like individual host overwrite cluster’s setting makes more sense.

Thanks in advance!

Gene

Just a short answer to myself. I have figured it out testing with a few different settings.

Could you explain to us as well?

It’s already explained in the docs:
http://docs.opennebula.org/4.10/administration/references/schg.html#limiting-the-resources-exposed-by-a-host

Prior to assgining a VM to a Host, the available capacity is checked to ensure that the VM fits in the host. The capacity is obtained by the monitor probes. You may alter this behaviour by reserving an amount of capacity (memory and cpu). You can reserve this capacity:

  • Cluster-wise, by updating the cluster template (e.g. onecluster update). All the host of the cluster will reserve the same amount of capacity.
  • Host-wise, by updating the host template (e.g. onehost update). This value will override those defined at cluster level.

In particular the following capacity attributes can be reserved:

  • RESERVED_CPU in percentage. It will be substracted from the TOTAL CPU
  • RESERVED_MEM in KB. It will be substracted from the TOTAL MEM

Note
These values can be negative, in that case you’ll be actually increassing the overall capacity so overcommiting host capacity.

Thank you!

Thank you Carlos! It’s so nice and clear in the doc indeed (I just missed the scheduler documentation).