Already simple, examples (like, e.g., the recently added unit tests) show that a weight of 1.0 for the memory balance is not high enough to influence a decision against static balancing aspects; this is also to be expected as there are several of them (static memory, static disk, static CPU, etc) of total weight 1.0 each. Therefore, increase the weight that the maintenance daemons assigns to this component on memory over committed clusters significantly and make it increase with increasing over commitment. The function is still guesswork, but should be a much better starting point.
Signed-off-by: Klaus Aehlig <[email protected]> --- doc/design-memory-over-commitment.rst | 5 ++--- src/Ganeti/MaintD/Balance.hs | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/design-memory-over-commitment.rst b/doc/design-memory-over-commitment.rst index 44c5228..281a6ef 100644 --- a/doc/design-memory-over-commitment.rst +++ b/doc/design-memory-over-commitment.rst @@ -177,6 +177,5 @@ memory). The weighting for this metric component will have to be determined by experimentation and will depend on the memory ratio; for a memory ratio of ``1.0`` the weight will be ``0.0``, as memory need not be taken into account if no over-commitment is in place. -As a starting point for experimentation we will use weight ``0.0`` -if the memory ratio is ``1.0`` and weight ``1.0`` if it is bigger -than ``1.0``. +For memory ratios bigger than ``1.0``, the weight will be positive +and grow with the ratio. diff --git a/src/Ganeti/MaintD/Balance.hs b/src/Ganeti/MaintD/Balance.hs index de970a6..d48fb5d 100644 --- a/src/Ganeti/MaintD/Balance.hs +++ b/src/Ganeti/MaintD/Balance.hs @@ -298,7 +298,7 @@ balanceGroup memstate xens client allowedNodes threshold (gidx, (nl, il)) = do -- to change once more experience with memory over-commited clusters -- is gained. weightFromMemRatio :: Double -> Double -weightFromMemRatio f = if f > 1.0 then 1.0 else 0.0 +weightFromMemRatio f = 0.0 `max` (f - 1) * 5.0 -- | Apply the memory data to the cluster data. useMemData :: Double -- 2.6.0.rc2.230.g3dd15c0
