public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Michael Ryom <Michael@RyomHerold.dk>
To: pve-devel@lists.proxmox.com
Cc: Michael Ryom <Michael@RyomHerold.dk>
Subject: [PATCH cluster v2 01/14] datacenter config: add HA auto-rebalance margin mode and cooldown
Date: Sun, 18 Oct 2026 14:45:45 +0200	[thread overview]
Message-ID: <20261018124559.24305-2-Michael@RyomHerold.dk> (raw)
In-Reply-To: <20261018124559.24305-1-Michael@RyomHerold.dk>

The relative improvement margin of the automatic resource balancing
provides almost no hysteresis when a single resource dominates the
cluster load: with two nodes, a resource load v and a node base load
difference d, the relative improvement of moving the resource is
2d / (v + d), so background fluctuations of the node base loads are
enough to qualify a migration and, afterwards, its reverse (see bug
#8059).

Add a margin mode, which allows to interpret the existing margin as a
minimum absolute improvement in percentage points instead, which creates
a dead band for such migrations. It defaults to 'relative', i.e. the
behavior of existing setups does not change.

Also add a cooldown, which keeps resources moved by a resource
balancing migration from being considered for another one for the given
time. It defaults to 0, i.e. it is disabled.

Signed-off-by: Michael Ryom <Michael@RyomHerold.dk>
---
 src/PVE/DataCenterConfig.pm | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index 004122e..e637e63 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -75,8 +75,32 @@ EODESC
         maximum => 100,
         default => 10,
         requires => 'ha-auto-rebalance',
-        description => "The minimum relative improvement in cluster node imbalance,"
-            . " in percent, to commit to a resource balancing migration.",
+        description => "The minimum improvement in cluster node imbalance to commit to a"
+            . " resource balancing migration. Depending on the margin mode, either in"
+            . " percent of the current imbalance (relative) or in percentage points"
+            . " (absolute).",
+    },
+    'ha-auto-rebalance-margin-mode' => {
+        type => 'string',
+        enum => ['relative', 'absolute'],
+        optional => 1,
+        default => 'relative',
+        requires => 'ha-auto-rebalance',
+        description => "Whether the margin is the minimum relative or absolute improvement"
+            . " in cluster node imbalance. An absolute margin prevents migrations which"
+            . " only shuffle load without meaningfully improving the cluster balance, e.g."
+            . " a single dominating resource being moved back and forth because of"
+            . " fluctuations of the node base loads.",
+    },
+    'ha-auto-rebalance-cooldown' => {
+        type => 'integer',
+        optional => 1,
+        minimum => 0,
+        default => 0,
+        requires => 'ha-auto-rebalance',
+        description => "The time, in seconds, after a successful resource balancing"
+            . " migration in which the moved resources are not considered for another"
+            . " resource balancing migration. Set to 0 to disable the cooldown.",
     },
 };
 
-- 
2.47.3




  reply	other threads:[~2026-10-18 12:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-18 12:45 [PATCH cluster/ha-manager/manager/docs v2 00/14] auto rebalance: fix failure retry loop and oscillation Michael Ryom
2026-10-18 12:45 ` Michael Ryom [this message]
2026-10-18 12:45 ` [PATCH ha-manager v2 02/14] manager: factor out checking whether a resource motion is queued or running Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 03/14] test: add auto rebalance test cases for failing rebalance motions Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 04/14] fix #8059: manager: auto rebalance: do not retry failed rebalance motions right away Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 05/14] test: add auto rebalance test case for an immediate reverse motion Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 06/14] manager: auto rebalance: add optional cooldown for moved resources Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 07/14] test: add auto rebalance test case for a marginal absolute improvement Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 08/14] manager: auto rebalance: allow an absolute margin Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 09/14] sim: hardware: report actual running state in cluster service stats Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 10/14] sim: hardware: allow setting a base load for nodes Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 11/14] test: add auto rebalance test case for fluctuating node base loads Michael Ryom
2026-10-18 12:45 ` [PATCH ha-manager v2 12/14] usage: dynamic: smooth the unaccounted node load Michael Ryom
2026-10-18 12:45 ` [PATCH manager v2 13/14] ui: crs options: expose the auto-rebalance margin mode and cooldown Michael Ryom
2026-10-18 12:45 ` [PATCH docs v2 14/14] ha-manager: document the auto-rebalance margin mode, cooldown and failed migrations Michael Ryom

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261018124559.24305-2-Michael@RyomHerold.dk \
    --to=michael@ryomherold.dk \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal