all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Rusovac <d.rusovac@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [RFC proxmox] resource-scheduling: add module-level docs
Date: Fri,  6 Mar 2026 09:22:09 +0100	[thread overview]
Message-ID: <20260306082209.34858-1-d.rusovac@proxmox.com> (raw)

Describe TOPSIS algorithm and static resource scheduling.

Signed-off-by: Dominik Rusovac <d.rusovac@proxmox.com>
---
 proxmox-resource-scheduling/src/pve_static.rs | 18 ++++++++++++++++++
 proxmox-resource-scheduling/src/topsis.rs     | 11 +++++++++++
 2 files changed, 29 insertions(+)

diff --git a/proxmox-resource-scheduling/src/pve_static.rs b/proxmox-resource-scheduling/src/pve_static.rs
index b81086dd..38da1d66 100644
--- a/proxmox-resource-scheduling/src/pve_static.rs
+++ b/proxmox-resource-scheduling/src/pve_static.rs
@@ -1,3 +1,21 @@
+//! Models usage of guests and nodes, and allows scoring nodes on which to start a new service via
+//! TOPSIS. For this scoring, each node in turn is considered as if the service was already running
+//! on it.
+//!
+//! CPU and memory usage are used as criteria, with memory being weighted much more, because it's a
+//! truly limited resource. For both, CPU and memory, highest usage among nodes (weighted more, as
+//! ideally no node should be overcommitted) and the [`root mean square`] (average) of usages across all
+//! nodes are considered.
+//!
+//! # Technical Details
+//! - As an alternative to the vector normalization method in the underlying TOPSIS algorithm, which
+//!   can lead to suboptimal decisions, [`min-max normalization`] was evaluated. While promising in
+//!   certain cases, the results were not convincing enough to swap normalization methods.
+//! - To mitigate suboptimal decisions, re-scaling CPU usage was also evaluated. Again promising in
+//!   certain cases, yet overall not convincing enough.
+//!
+//! [`root mean square`]: https://en.wikipedia.org/wiki/Root_mean_square
+//! [`min-max normalization`]: https://en.wikipedia.org/wiki/Feature_scaling
 use anyhow::Error;
 use serde::{Deserialize, Serialize};
 
diff --git a/proxmox-resource-scheduling/src/topsis.rs b/proxmox-resource-scheduling/src/topsis.rs
index 6d078aa6..9aec404c 100644
--- a/proxmox-resource-scheduling/src/topsis.rs
+++ b/proxmox-resource-scheduling/src/topsis.rs
@@ -1,3 +1,14 @@
+//! TOPSIS algorithm to score multi-valued alternatives according to a given set of weighted
+//! criteria.
+//!
+//! # Technical Details
+//! Implements variant of TOPSIS as outlined [`here`], meaning:
+//! - alternatives are being normalized using vector normalization; and
+//! - the score of an alternative corresponds to its similarity to the worst idealized
+//!   alternative[^note].
+//!
+//! [`here`]: https://en.wikipedia.org/wiki/TOPSIS
+//! [^note]: This alternative consists of the worst value for each single criterion among all alternatives.
 use anyhow::{bail, Error};
 
 fn differences<const N: usize>(xs: &[f64; N], ys: &[f64; N]) -> [f64; N] {
-- 
2.47.3





                 reply	other threads:[~2026-03-06  8:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20260306082209.34858-1-d.rusovac@proxmox.com \
    --to=d.rusovac@proxmox.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal