[pve-devel] [RFC cluster/common/container/manager/pve9-rrd-migration-tool/qemu-server/storage 00/19] Expand and migrate RRD data
DERUMIER, Alexandre
alexandre.derumier at groupe-cyllene.com
Mon May 26 13:52:51 CEST 2025
Thanks Aaron for this work,
pressure are really something usefull (more than the classic load
average), could be use to evict/migrate a vm from a node when pressure
is too high.
I was to original author of read_pressure/parse_pressure, but I never
had finished the rrd integration, so many thanks !
-------- Message initial --------
De: Aaron Lauterer <a.lauterer at proxmox.com>
Répondre à: Proxmox VE development discussion <pve-
devel at lists.proxmox.com>
À: pve-devel at lists.proxmox.com
Objet: [pve-devel] [RFC cluster/common/container/manager/pve9-rrd-
migration-tool/qemu-server/storage 00/19] Expand and migrate RRD data
Date: 23/05/2025 18:00:10
This patch series expands the RRD format for nodes and VMs. For all
types
(nodes, VMs, storage) we adjust the aggregation to align them with the
way they
are done on the Backup Server. Therefore, we have new RRD defitions for
all
3 types.
New values are added for nodes and VMs. In particular:
Nodes:
* memfree
* membuffers
* memcached
* arcsize
* pressures:
* cpu some
* io some
* io full
* mem some
* mem full
VMs:
* memhost (memory consumption of all processes in the guests cgroup,
host view)
* pressures:
* cpu some
* cpu full
* io some
* io full
* mem some
* mem full
To not lose old RRD data, we need to migrate the old RRD files to the
ones with
the new schema. Some initial performance tests showed that migrating
10k VM
RRD files took ~2m40s single threaded. This is way to long to do it
within the
pmxcfs itself. Therefore this will be a dedicated step. I wrote a small
rust
tool that binds to librrd to to the migraton.
We could include it in a post-install step when upgrading to PVE 9.
To avoid missing data and key errors in the journal, we need to ship
some
changes to PVE 8 that can handle the new format sent out by pvestatd.
Those
patches are the first in the series and are marked with a "-pve8"
postfix in the
repo name.
This RFC series so far only handles migration and any changes needed
for the new
fields. It does not yet include any GUI patches to add additional
graphs to the
summary pages of nodes and guests.
Plans:
* Add GUI parts:
* Additional graphs, mostly for pressures.
* add more info the memory graph. e.g. ZFS ARC
* add host memory view of guests in graph and gauge
* pve8to9:
* have a check how many RRD files are present and verify that there
is enough
space on the root FS
How to test:
1. build pve-cluster with the pve8 patches and install it on all nodes.
2. build all the other packages and install them.
build the migration tool with cargo and copy the binary to the nodes
for now.
3. run the migration tool on the first host
4. continue running the migration tool on the other nodes one by one
If you uncomment the extra logging in the pmxcfs/status.c you should
see how
the different situations are handled.
In the PVE8 patches start at line 1373, in the later patches for PVE9
it starts
at line 1565.
cluster-pve8:
Aaron Lauterer (2):
cfs status.c: drop old pve2-vm rrd schema support
status: handle new pve9- metrics update data
src/pmxcfs/status.c | 56 ++++++++++++++++++++++++++++++++++-----------
src/pmxcfs/status.h | 2 ++
2 files changed, 45 insertions(+), 13 deletions(-)
pve9-rrd-migration-tool:
Aaron Lauterer (1):
introduce rrd migration tool for pve8 -> pve9
cluster:
Aaron Lauterer (1):
status: introduce new pve9- rrd and metric format
src/pmxcfs/status.c | 242 +++++++++++++++++++++++++++++++++++++++-----
1 file changed, 217 insertions(+), 25 deletions(-)
common:
Aaron Lauterer (1):
add helper to fetch value from smaps_rollup for pid
Folke Gleumes (3):
fix error in pressure parsing
add functions to retrieve pressures for vm/ct
metrics: add buffer and cache to meminfo
src/PVE/ProcFSTools.pm | 42 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 41 insertions(+), 1 deletion(-)
manager:
Aaron Lauterer (5):
api2tools: drop old VM rrd schema
pvestatd: collect and distribute new pve9- metrics
api: nodes: rrd and rrddata fetch from new pve9-node rrd files if
present
api2tools: extract stats: handle existence of new pve9- data
ui: rrdmodels: add new columns
PVE/API2/Nodes.pm | 8 +-
PVE/API2Tools.pm | 24 +----
PVE/Service/pvestatd.pm | 128 +++++++++++++++++++++------
www/manager6/data/model/RRDModels.js | 16 ++++
4 files changed, 126 insertions(+), 50 deletions(-)
storage:
Aaron Lauterer (1):
status: rrddata: use new pve9 rrd location if file is present
src/PVE/API2/Storage/Status.pm | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
qemu-server:
Aaron Lauterer (3):
vmstatus: add memhost for host view of vm mem consumption
vmstatus: switch mem stat to PSS of VM cgroup
rrddata: use new pve9 rrd location if file is present
Folke Gleumes (1):
metrics: add pressure to metrics
PVE/API2/Qemu.pm | 4 +++-
PVE/QemuServer.pm | 23 +++++++++++++++++++----
2 files changed, 22 insertions(+), 5 deletions(-)
container:
Aaron Lauterer (1):
rrddata: use new pve9 rrd location if file is present
src/PVE/API2/LXC.pm | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Summary over all repositories:
12 files changed, 457 insertions(+), 98 deletions(-)
More information about the pve-devel
mailing list