From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 249601FF13C for ; Thu, 30 Apr 2026 10:33:20 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 244581F2AE; Thu, 30 Apr 2026 10:33:19 +0200 (CEST) Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Thu, 30 Apr 2026 10:33:14 +0200 Message-Id: From: "Dominik Rusovac" To: "Daniel Kral" , Subject: Re: [PATCH proxmox v2 1/6] resource-scheduling: clamp imbalance value to unit interval X-Mailer: aerc 0.20.0 References: <20260429122051.179485-1-d.rusovac@proxmox.com> <20260429122051.179485-2-d.rusovac@proxmox.com> In-Reply-To: X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1777537895927 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.390 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [ipbeja.pt,stackexchange.com] Message-ID-Hash: PYLRSB4KNZRFJ2UF7L2AGAFV6DCEJE6O X-Message-ID-Hash: PYLRSB4KNZRFJ2UF7L2AGAFV6DCEJE6O 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 Thu Apr 30, 2026 at 9:48 AM CEST, Daniel Kral wrote: > On Wed Apr 29, 2026 at 2:20 PM CEST, Dominik Rusovac wrote: >> The currently used load imbalance value is given as the so-called >> coefficient of variation (CV), a value that may exceed 1. As such, the >> CV value alone lacks meaning. A CV value of 0.0 means no imbalance, but >> what does a value of, say, 1.7 mean? >> >> Relative to the number of nodes in a cluster, it is possible to >> determine the upper bound of the CV value [0][1]. By dividing the CV >> value by its upper bound, the load imbalance can be represented as a >> value that varies between 0 and 1. Expressing the CV as a percentage >> makes the concept of load imbalance easier to interpret. >> >> Re-adjust hardcoded imbalance values within tests accordingly. >> >> [0] https://repositorio.ipbeja.pt/server/api/core/bitstreams/8ed9a444-db= e0-402f-9d2f-90c5bf6e418c/content >> [1] https://stats.stackexchange.com/questions/18621/maximum-value-of-coe= fficient-of-variation-for-bounded-data-set >> >> Signed-off-by: Dominik Rusovac >> --- >> >> Notes: >> changes since v1: >> * squash commit that re-adjusts tests into this one >> * back to multiple `as f64` casts of node_count variable >> * go from if-else to early-return >> * make comment above early return clause more explanatory >> * re-order cv and max_cv bindings >> * add comment with ref relating to computation of max_cv >> [snip] >> + let cv =3D load_sd / load_mean; >> + =20 > > small whitespace error, could also be fixed on apply though > in fact, the whitespace is intentional here since you asked to add a ref relating to max_cv, I decided to isolate the binding with its respective comment, which imo increases readability=20 can be removed on apply tho, if it's considered disturbing [snip]