RESERVED_MEM as percentage?

Hello,

Reading the documentation for RESERVED_CPU and RESERVED_MEM, I found that CPU reservation is expressed in percentage but not memory reservation.

I found in the bug tracker two related issues:

The old parameter HYPERVISOR_MEM was in percentage but the new one is in KB, unfortunately, I found no explanation about the change of unit (KB instead of %).

If I would like to reserve 10% of memory for all host, I would like to do it cluster wide, now I need to calculate for all hosts and set it for each host.

Is there a way to achieve it?

Regards.

Hi Daniel,

In fact all reservation values are “absolute” from the original metric,
which can be a relative metric. If the metric is % then reservation is
expressed in %, but note that CPU can be 800 and reserving 10 will let to
790 available and not 720 (800 - 0.1 * 800).

Memory is the same absolute, in the past we had memory reservation as %;
but most people didn’t want that. 10% of a host with 128GB can be way to
much.

So there is no way to set 10% of memory; but yes you can set this at
cluster level.

Cheers