all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [RFC ha-manager] make static usage calculation faster
@ 2022-11-18 11:32 Fiona Ebner
  2022-11-18 11:32 ` [pve-devel] [RFC ha-manager 1/3] resources: get static stats: add cache parameter Fiona Ebner
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fiona Ebner @ 2022-11-18 11:32 UTC (permalink / raw)
  To: pve-devel

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-18 11:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-18 11:32 [pve-devel] [RFC ha-manager] make static usage calculation faster Fiona Ebner
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

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