From: Fiona Ebner <f.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [RFC ha-manager] make static usage calculation faster
Date: Fri, 18 Nov 2022 12:32:20 +0100 [thread overview]
Message-ID: <20221118113223.49305-1-f.ebner@proxmox.com> (raw)
by avoiding overhead from load_config().
Benchmarked recompute_online_node_usage() again with ~300 HA services
(minimal containers) running on my virtual test cluster.
Timings with 'basic' were between 0.0004 - 0.002 seconds
(a bit worse today than last time)
Timings before these patches were between 0.007 - 0.016 seconds
(also a bit worse than last time)
Timings after these patches were between 0.0035 - 0.006 seconds
So only about twice as fast unfortunately. Reducing the number of
recompute_online_node_usage() calls might be necessary after all.
Probably not worth applying, as this didn't get much testing and is
not a huge improvement :/
Fiona Ebner (3):
resources: get static stats: add cache parameter
env: add get_static_guest_stats method
manager/usage: cache static service stats to avoid overhead
src/PVE/HA/Env.pm | 6 ++++++
src/PVE/HA/Env/PVE2.pm | 15 +++++++++++++++
src/PVE/HA/Manager.pm | 1 +
src/PVE/HA/Resources.pm | 2 +-
src/PVE/HA/Resources/PVECT.pm | 5 +++--
src/PVE/HA/Resources/PVEVM.pm | 6 ++++--
src/PVE/HA/Sim/Env.pm | 7 +++++++
src/PVE/HA/Sim/Resources.pm | 2 +-
src/PVE/HA/Usage/Static.pm | 13 ++++++++++---
9 files changed, 48 insertions(+), 9 deletions(-)
--
2.30.2
next reply other threads:[~2022-11-18 11:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-18 11:32 Fiona Ebner [this message]
2022-11-18 11:32 ` [pve-devel] [RFC ha-manager 1/3] resources: get static stats: add cache parameter Fiona Ebner
2022-11-18 11:32 ` [pve-devel] [RFC ha-manager 2/3] env: add get_static_guest_stats method Fiona Ebner
2022-11-18 11:32 ` [pve-devel] [RFC ha-manager 3/3] manager/usage: cache static service stats to avoid overhead Fiona Ebner
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=20221118113223.49305-1-f.ebner@proxmox.com \
--to=f.ebner@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