From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id C72201FF0B6 for ; Thu, 12 Nov 2026 10:45:00 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 61C4021692; Thu, 12 Nov 2026 10:44:50 +0100 (CET) From: Dominik Rusovac To: pve-devel@lists.proxmox.com Subject: [PATCH proxmox v2 02/19] resource-scheduling: scheduler: refine score_* docs Date: Thu, 12 Nov 2026 10:44:20 +0100 Message-ID: <20261112094437.1951271-3-d.rusovac@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261112094437.1951271-1-d.rusovac@proxmox.com> References: <20261112094437.1951271-1-d.rusovac@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794476685177 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.050 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: 5BYMWEGS44B4O2OUPOZXSHVT2NUPQMI5 X-Message-ID-Hash: 5BYMWEGS44B4O2OUPOZXSHVT2NUPQMI5 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: to be more precise, refine parts of docs of functions responsible for scoring migration candidates and selecting node to start service on, respectively Signed-off-by: Dominik Rusovac --- Notes: new, split out of patch [0] in v1 respective changes: * slightly reword docs [0] https://lore.proxmox.com/all/20261021085932.1196302-4-d.rusovac@proxmox.com/ proxmox-resource-scheduling/src/scheduler.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/proxmox-resource-scheduling/src/scheduler.rs b/proxmox-resource-scheduling/src/scheduler.rs index 9078fa72..60e60d3c 100644 --- a/proxmox-resource-scheduling/src/scheduler.rs +++ b/proxmox-resource-scheduling/src/scheduler.rs @@ -228,15 +228,15 @@ impl Scheduler { }) } - /// Scores the given migration `candidates` by the best node imbalance improvement with - /// exhaustive search. + /// Uses bruteforce search to score how much each of the given migration `candidates` improves + /// node imbalance and ranks them accordingly. /// /// The `candidates` are assumed to be consistent with the scheduler. No further validation is /// done whether the given nodenames actually exist in the scheduler. /// /// The scoring is done as if each resource migration has already been done. This assumes that /// the already migrated resource consumes the same amount of each stat as on the previous node - /// according to its `stats`. + /// according to its `stats`. The lower the score, the better. /// /// Returns up to `limit` of the best scored migrations. pub fn score_best_balancing_migration_candidates( @@ -269,8 +269,7 @@ impl Scheduler { best_migrations } - /// Scores the given migration `candidates` by the best node imbalance improvement with the - /// TOPSIS method. + /// Scores the given migration `candidates` using the TOPSIS method. /// /// The `candidates` are assumed to be consistent with the scheduler. No further validation is /// done whether the given nodenames actually exist in the scheduler. @@ -321,7 +320,8 @@ impl Scheduler { .collect()) } - /// Scores nodes to start a resource with the usage statistics `resource_stats` on. + /// Scores nodes to start a resource with the usage statistics `resource_stats` on, using the + /// TOPSIS method. /// /// The scoring is done as if the resource is already started on each node. This assumes that /// the already started resource consumes the maximum amount of each stat according to its -- 2.47.3