Add sensors to detect memory pressure for VMs / LXCs #685
|
In Linux environments RAM used / free values are often relatively uninteresting. It would be more interesting to report the value of the available memory instead. A problem (probably why this is not even shown on the PVE UI) is that I do not think that Windows VM's could provide such a value. Another (OS independent) approach could be providing the pressure values (memory pressure stall, IO pressure stall, CPU pressure stall). Background: Linux typically reserves almost everything it can get of the RAM and correctly shows it as RAM used. Nevertheless, one typically wants to detect if a VM requires more RAM, because it is under RAM pressure. Therefore, the RAM available value is more interesting, because it tells how much of the reserved RAM can be freed within short time by the OS and therefore is available for applications. |
Replies: 2 comments 2 replies
|
Both pressure groups are in 5.3.0: six sensors per VM and container — One thing to know before you read them: for a container these are its own cgroup, so they are what the workload experiences — which is what you asked for. For a VM they are measured on the host for that VM's process, so they say the host is stalling for that VM rather than what the guest OS sees. That is also why they work for a Windows guest. The available memory inside the guest I did not build, and I would rather say so than half-build it: the API has nothing for it. In a VM it would take If you try it, I would like to know whether the values match what |
|
It is out already — 5.3.0, released a few minutes ago. The sensors are diagnostic and disabled by default, so enable the ones you want on the guest's device page. Your numbers line up with what the sensor carries: Proxmox exposes exactly the If you want a real check, the thing to watch out for is the sampling window: the sensor is only as fresh as the polling interval, 60 seconds by default (30 is available under Advanced configuration). So either hold the pressure for longer than one interval, or force a read with and |
Both pressure groups are in 5.3.0: six sensors per VM and container —
CPU pressure,IO pressure,Memory pressureand their… stalledcounterparts — each the share of the last ten seconds in which at least one task waited for that resource, or every task did. Proxmox reports them on a read the integration already makes, so they cost nothing extra. Diagnostic and disabled by default; enable the ones you want on the guest's device page.Memory used on hostcame along for VMs: what the guest costs the host, which is more than what it reports using.One thing to know before you read them: for a container these are its own cgroup, so they are what the workload experiences — which is what you as…