From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id D402D1FF0B3 for ; Wed, 14 Oct 2026 15:04:02 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2A0EC2147C; Wed, 14 Oct 2026 15:03:59 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Wed, 14 Oct 2026 15:03:54 +0200 Message-Id: From: "Dominik Rusovac" To: "Daniel Kral" , "Michael Ryom" , Subject: Re: [PATCH ha-manager 3/7] manager: auto rebalance: require a minimum absolute imbalance improvement X-Mailer: aerc 0.20.0 References: <20260920162220.574802-1-Michael@RyomHerold.dk> <20260920162220.574802-4-Michael@RyomHerold.dk> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1791983034207 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.287 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: H3B2SQLWDY3D3VOXUIZINLKAYLANVJG6 X-Message-ID-Hash: H3B2SQLWDY3D3VOXUIZINLKAYLANVJG6 X-MailFrom: d.rusovac@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed Oct 14, 2026 at 2:23 PM CEST, Daniel Kral wrote: > On Sun Sep 20, 2026 at 6:22 PM CEST, Michael Ryom wrote: >> The automatic load balancer only requires a relative improvement of the >> node imbalance (default 10%). When a single resource dominates the >> cluster load, the relative margin provides almost no hysteresis: 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 it >> exceeds a margin m as soon as d > v * m / (2 - m). For a mid-size VM >> that is a base load difference of about half a percentage point, well >> within the normal fluctuation of e.g. the ZFS ARC or Ceph daemons, and >> each fluctuation then qualifies a motion (and, after it was carried >> out, its reverse). >> >> Additionally require the imbalance improvement to exceed a minimum >> absolute value of 5 percentage points. This creates a dead band for >> motions that shuffle load without meaningfully improving the cluster >> balance. No expected motion of an existing regression test is affected; >> the smallest occurring improvement there is 9.6 percentage points. >> >> Like the backoff and cooldown constants, this could be exposed as a >> ha-auto-rebalance-* option later. > > I think the absolute minimum imbalance improvement is a good idea. > > The relative 'margin' was only introduced to compensate for the > initially unbound imbalance value for different cluster sizes, which was > changed to be in [0,1] for all cluster sizes only in a later revision. > > Though I'd prefer if this can be configured by users from the get-go. > For simplicity, I'd merge it with the ha-auto-rebalance-margin option, > and add a flag which can switch the value's semantic meaning between > 'relative' (the default, because of backwards compatibility) and > 'absolute'. +1 > > Except if there really are use cases which require both a relative and > an absolute minimum imbalance improvement? tbh atm I cannot come up with a use case actually, I'd find it kind of strange to insist that the relative change in the load imbalance also corresponds to the absolute change, and vice versa [snip]