]> git.proxmox.com Git - proxmox-resource-scheduling.git/log
proxmox-resource-scheduling.git
11 months agobuildsys: derive upload dist automatically master
Thomas Lamprecht [Mon, 8 May 2023 12:59:20 +0000 (14:59 +0200)]
buildsys: derive upload dist automatically

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobump version to 0.3.0-1
Thomas Lamprecht [Mon, 8 May 2023 12:50:28 +0000 (14:50 +0200)]
bump version to 0.3.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobuildsys: add sbuild target for convenience
Thomas Lamprecht [Mon, 8 May 2023 12:49:15 +0000 (14:49 +0200)]
buildsys: add sbuild target for convenience

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobuildsys: drop no-pre-clean flags for buildpackage invocation
Thomas Lamprecht [Mon, 8 May 2023 12:48:54 +0000 (14:48 +0200)]
buildsys: drop no-pre-clean flags for buildpackage invocation

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobuildsys: cleanup and expand clean target
Thomas Lamprecht [Mon, 8 May 2023 12:48:00 +0000 (14:48 +0200)]
buildsys: cleanup and expand clean target

also remove *.build files (generated by sbuild)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agobump version to 0.2.1-1
Thomas Lamprecht [Tue, 21 Mar 2023 16:54:40 +0000 (17:54 +0100)]
bump version to 0.2.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agopve static: add one to avoid boosting tiny relative differences
Fiona Ebner [Tue, 21 Mar 2023 16:44:50 +0000 (17:44 +0100)]
pve static: add one to avoid boosting tiny relative differences

Only the relative difference for values between different alternatives
is relevant, meaning 0.002 vs 0.004 and 0.2 vs 0.4 will influence the
scoring in the same way. This is not really desirable, because values
closer to 1.0 indicate higher load and thus should influence the
scoring more than differences that are actually tiny, but big when
viewed as a relative difference.

To avoid the issue, simply add 1.0 to all values. Like that, 1.002 vs
1.004 will also be small when viewed as a relative difference.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
13 months agobump version to 0.2.0-1
Thomas Lamprecht [Tue, 21 Mar 2023 13:54:21 +0000 (14:54 +0100)]
bump version to 0.2.0-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
13 months agopve ha: fix typo in comment
Fiona Ebner [Tue, 21 Mar 2023 12:33:43 +0000 (13:33 +0100)]
pve ha: fix typo in comment

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
13 months agopve ha: fix scoring issue when a node is overcommitted compared to others
Fiona Ebner [Tue, 21 Mar 2023 12:33:42 +0000 (13:33 +0100)]
pve ha: fix scoring issue when a node is overcommitted compared to others

When nodes have different stats, the sum of percentage values will be
different for different alternatives, so the linear average is enough.
But when nodes have the same stats, this is not the case, the sum will
be the same, thus the average won't influence the scoring. If there is
an already overcommitted node, all alternatives besides the already
overcommitted node would be scored the same.

To fix it, use the squares of percentages instead, where more evenly
distributed usage across nodes will lead to a smaller value and thus
better scoring.

It's not really necessary to divide by length or take the sqrt, but it
seemed nicer to have something that would give 1.0 if all inputs are
1.0.

Reported-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
17 months agobump version to 0.1.0-1
Wolfgang Bumiller [Tue, 15 Nov 2022 10:08:33 +0000 (11:08 +0100)]
bump version to 0.1.0-1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agoCargo.toml: remove lib section
Wolfgang Bumiller [Tue, 15 Nov 2022 10:08:00 +0000 (11:08 +0100)]
Cargo.toml: remove lib section

as this is just the default anyway

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agocomment on lack of optimization of array::from_fn
Wolfgang Bumiller [Fri, 11 Nov 2022 12:08:26 +0000 (13:08 +0100)]
comment on lack of optimization of array::from_fn

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agoavoid some more allocations
Wolfgang Bumiller [Fri, 11 Nov 2022 10:52:17 +0000 (11:52 +0100)]
avoid some more allocations

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agoavoid extra allocation in rank_alternatives
Wolfgang Bumiller [Fri, 11 Nov 2022 10:45:28 +0000 (11:45 +0100)]
avoid extra allocation in rank_alternatives

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agoshorten code
Wolfgang Bumiller [Fri, 11 Nov 2022 10:44:43 +0000 (11:44 +0100)]
shorten code

this now wouldn't cause the weigh() lines to exceed 100
chars ;-)

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agosimplify weighing
Wolfgang Bumiller [Fri, 11 Nov 2022 10:42:54 +0000 (11:42 +0100)]
simplify weighing

We already use functions that take or return the full [T; N]
array, so let's just do the same here, it's a bit shorter
this way.

If we get worried about large values we should implement
versions with `&mut [T; N]` consistently for all math
functions.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agosimplifications
Wolfgang Bumiller [Fri, 11 Nov 2022 10:41:01 +0000 (11:41 +0100)]
simplifications

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agodrop Topsis prefix of all the types in topsis::
Wolfgang Bumiller [Fri, 11 Nov 2022 10:35:53 +0000 (11:35 +0100)]
drop Topsis prefix of all the types in topsis::

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agomake ideal_alternatives a method of IdealAlternatives
Wolfgang Bumiller [Fri, 11 Nov 2022 10:31:34 +0000 (11:31 +0100)]
make ideal_alternatives a method of IdealAlternatives

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agoreorder impl blocks
Wolfgang Bumiller [Fri, 11 Nov 2022 10:30:48 +0000 (11:30 +0100)]
reorder impl blocks

so they're next to their types

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agoadd criteria_struct helper macro
Wolfgang Bumiller [Fri, 11 Nov 2022 10:27:53 +0000 (11:27 +0100)]
add criteria_struct helper macro

This enforces the order in the Criteria and its From into
the Matrix entry.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
17 months agoadd Debian packaging
Fiona Ebner [Thu, 10 Nov 2022 14:37:42 +0000 (15:37 +0100)]
add Debian packaging

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
17 months agoadd pve_static module
Fiona Ebner [Thu, 10 Nov 2022 14:37:41 +0000 (15:37 +0100)]
add pve_static module

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 overcommited) and average usage of all nodes (to still be
able to distinguish in case there already is a more highly commited
node) are considered.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
17 months agoinitial commit
Fiona Ebner [Thu, 10 Nov 2022 14:37:40 +0000 (15:37 +0100)]
initial commit

Implement the TOPSIS[0] algorithm to score multi-valued alternatives
according to a given set of weighted criteria.

The number of alternatives cannot be known at compile time, but the
number of criteria should be (a given module using the topsis module
should have one (or more) fixed sets of criteria). Therefore, the
TopsisMatrix is implemented as a Vec of N_CRITERIA-sized arrays.

Compared to the description in [0] the weighing of the matrix
according to the weights of the criteria only happens during distance
calculation to the idealized alternatives. It turned out more natural
like that, because the matrix doesn't need to be mutable.

[0]: https://en.wikipedia.org/wiki/TOPSIS

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>