From: Aaron Lauterer <a.lauterer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v4 04/15] ui: rrdmodels: add new columns and update existing
Date: Sat, 26 Jul 2025 03:06:08 +0200 [thread overview]
Message-ID: <20250726010626.1496866-14-a.lauterer@proxmox.com> (raw)
In-Reply-To: <20250726010626.1496866-1-a.lauterer@proxmox.com>
The new columns we get from RRD are added.
Since we are switching the memory graphs to stacked graphs, we need to
handle them a bit different because:
* gaps are not possible, we need to have a value, ideally 'null' when
there is no data, makes it easier to handle in the tooltip
* calculate some values and not take the ones received from RRD.
Otherwise the memory graphs can be _wobbly_. For example if we take
the node memory where we have memused + arcsize + memavailable. Those
will not always line up perfectly from the gathered data to match the
total physical memory. Similar for the memory graph for guests.
The values we calculate are for nodes:
* memused-sub-arcsize: because the arcsize is included in memused, but
we want to show it as a separate part of the graph if we do have that
information.
If we don't have the arcsize values (older node for example), we set
it to 0.
* memfree-capped: instead of memavailable we calculate the free memory
to avoid memory graphs that have wobbles and spikes due to timing
differences when gathering the data.
For guests:
* memfree-capped: We cannot just have two line graphs, but will stack
them as well to match the node graph. Therefore we need to subtract
the memused from maxmen, so that in total, both data lines will result
in maxmem.
Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
---
Notes:
changes since:
v3:
* remove default values and handle situations where we need 'null' in
the calculations. Only for guests we need to give 'mem' a default
value as we use it directly in a stacked graph.
* reorder calculation condition checks
* rename calculated value for guests from maxmem-capped to
memfree-capped to reflect better what it is
v2:
* add default values where needed for area graphs
* add calculated values, usually to keep the memory graphs from spiking
at the top due to slight timing differences where the data doesn't
align perfectly
RFC:
* drop node memcache and membuffer columns as we now have memavailable
which is better suited
www/manager6/data/model/RRDModels.js | 44 +++++++++++++++++++++++++++-
1 file changed, 43 insertions(+), 1 deletion(-)
diff --git a/www/manager6/data/model/RRDModels.js b/www/manager6/data/model/RRDModels.js
index 82f4e5cd..5070dac2 100644
--- a/www/manager6/data/model/RRDModels.js
+++ b/www/manager6/data/model/RRDModels.js
@@ -25,7 +25,33 @@ Ext.define('pve-rrd-node', {
'rootused',
'swaptotal',
'swapused',
+ 'memfree',
+ 'arcsize',
+ 'pressurecpusome',
+ 'pressureiosome',
+ 'pressureiofull',
+ 'pressurememorysome',
+ 'pressurememoryfull',
{ type: 'date', dateFormat: 'timestamp', name: 'time' },
+ {
+ name: 'memfree-capped',
+ calculate: function (data) {
+ if (data.memtotal >= 0 && data.memused >= 0 && data.memtotal >= data.memused) {
+ return data.memtotal - data.memused;
+ }
+ return null;
+ },
+ },
+ {
+ name: 'memused-sub-arcsize',
+ calculate: function (data) {
+ let arcsize = data.arcsize ?? 0; // pre pve9 nodes don't report any arcsize
+ if (data.memused >= 0 && arcsize >= 0 && data.memused >= arcsize) {
+ return data.memused - arcsize;
+ }
+ return null;
+ },
+ },
],
});
@@ -42,13 +68,29 @@ Ext.define('pve-rrd-guest', {
'maxcpu',
'netin',
'netout',
- 'mem',
+ { name: 'mem', defaultValue: null },
'maxmem',
'disk',
'maxdisk',
'diskread',
'diskwrite',
+ 'memhost',
+ 'pressurecpusome',
+ 'pressurecpufull',
+ 'pressureiosome',
+ 'pressurecpufull',
+ 'pressurememorysome',
+ 'pressurememoryfull',
{ type: 'date', dateFormat: 'timestamp', name: 'time' },
+ {
+ name: 'memfree-capped',
+ calculate: function (data) {
+ if (data.maxmem >= 0 && data.mem >= 0 && data.maxmem >= data.mem) {
+ return data.maxmem - data.mem;
+ }
+ return null;
+ },
+ },
],
});
--
2.39.5
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next prev parent reply other threads:[~2025-07-26 1:06 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-26 1:05 [pve-devel] [PATCH many v4 00/31] Expand and migrate RRD data and add/change summary graphs Aaron Lauterer
2025-07-26 1:05 ` [pve-devel] [PATCH proxmox-rrd-migration-tool v4 1/3] create proxmox-rrd-migration-tool Aaron Lauterer
2025-07-28 14:25 ` Lukas Wagner
2025-07-26 1:05 ` [pve-devel] [PATCH proxmox-rrd-migration-tool v4 2/3] add first tests Aaron Lauterer
2025-07-28 14:52 ` Lukas Wagner
2025-07-26 1:05 ` [pve-devel] [PATCH proxmox-rrd-migration-tool v4 3/3] add debian packaging Aaron Lauterer
2025-07-28 14:36 ` Lukas Wagner
2025-07-29 9:29 ` Thomas Lamprecht
2025-07-29 9:49 ` Lukas Wagner
2025-07-30 17:57 ` [pve-devel] applied: " Thomas Lamprecht
2025-07-26 1:05 ` [pve-devel] [PATCH cluster v4 1/2] status: introduce new pve-{type}- rrd and metric format Aaron Lauterer
2025-07-29 9:44 ` Lukas Wagner
2025-07-30 11:21 ` Lukas Wagner
2025-07-31 3:23 ` Thomas Lamprecht
2025-07-26 1:06 ` [pve-devel] [PATCH cluster v4 2/2] rrd: adapt to new RRD format with different aggregation windows Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH widget-toolkit v4 1/4] rrdchart: allow to override the series object Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH widget-toolkit v4 2/4] rrdchart: use reference for undo button Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH widget-toolkit v4 3/4] rrdchard: set cursor pointer for legend Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH widget-toolkit v4 4/4] rrdchart: add dummy listener for legend clicks Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 01/15] pvestatd: collect and distribute new pve-{type}-9.0 metrics Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 02/15] api: nodes: rrd and rrddata add decade option and use new pve-node-9.0 rrd files Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 03/15] api2tools: extract_vm_status add new vm memhost column Aaron Lauterer
2025-07-26 1:06 ` Aaron Lauterer [this message]
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 05/15] ui: node summary: use stacked memory graph with zfs arc Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 06/15] ui: add pressure graphs to node and guest summary Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 07/15] ui: GuestStatusView: add memhost for VM guests Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 08/15] ui: GuestSummary: memory switch to stacked and add hostmem Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 09/15] ui: GuestSummary: remember visibility of host memory view Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 10/15] ui: nodesummary: guestsummary: add tooltip info buttons Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 11/15] ui: summaries: use titles for disk and network series Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 12/15] fix #6068: ui: utils: calculate and render host memory usage correctly Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 13/15] d/control: require proxmox-rrd-migration-tool >= 1.0.0 Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH manager v4 14/15] d/postinst: run promox-rrd-migration-tool Aaron Lauterer
2025-07-29 12:09 ` Lukas Wagner
2025-07-26 1:06 ` [pve-devel] [PATCH manager stabe-8+master v4 15/15] pve8to9: add checkfs for RRD migration Aaron Lauterer
2025-07-29 8:15 ` Lukas Wagner
2025-07-29 9:16 ` Thomas Lamprecht
2025-07-26 1:06 ` [pve-devel] [PATCH storage v4 1/1] status: rrddata: use new pve-storage-9.0 rrd location if file is present Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH qemu-server v4 1/4] metrics: add pressure to metrics Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH qemu-server v4 2/4] vmstatus: add memhost for host view of vm mem consumption Aaron Lauterer
2025-07-29 12:49 ` Lukas Wagner
2025-07-31 3:37 ` Thomas Lamprecht
2025-07-31 6:51 ` Lukas Wagner
2025-07-26 1:06 ` [pve-devel] [PATCH qemu-server v4 3/4] vmstatus: switch mem stat to PSS of VM cgroup Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH qemu-server v4 4/4] rrddata: use new pve-vm-9.0 rrd location if file is present Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH container v4 1/2] metrics: add pressures to metrics Aaron Lauterer
2025-07-26 1:06 ` [pve-devel] [PATCH container v4 2/2] rrddata: use new pve-vm-9.0 rrd location if file is present Aaron Lauterer
2025-07-28 14:42 ` [pve-devel] [PATCH many v4 00/31] Expand and migrate RRD data and add/change summary graphs Thomas Lamprecht
2025-07-29 12:19 ` Lukas Wagner
2025-07-31 4:12 ` [pve-devel] applied: " Thomas Lamprecht
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=20250726010626.1496866-14-a.lauterer@proxmox.com \
--to=a.lauterer@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.