memory: rename commit_limit, drop free system PTEs, add standby cache lifetime (#2694)

Co-authored-by: Claude <noreply@anthropic.com>
Signed-off-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jan-Otto Kröpke
2026-10-11 23:03:30 +02:00
committed by GitHub
co-authored by Claude
parent cd7acb5618
commit 491bb0de73
17 changed files with 85 additions and 77 deletions
+16 -15
View File
@@ -57,7 +57,6 @@ type Collector struct {
committedBytes *prometheus.Desc
demandZeroFaultsTotal *prometheus.Desc
freeAndZeroPageListBytes *prometheus.Desc
freeSystemPageTableEntries *prometheus.Desc
modifiedPageListBytes *prometheus.Desc
pageFaultsTotal *prometheus.Desc
swapPageReadsTotal *prometheus.Desc
@@ -71,6 +70,7 @@ type Collector struct {
poolPagedBytes *prometheus.Desc
poolPagedResidentBytes *prometheus.Desc
standbyCacheCoreBytes *prometheus.Desc
standbyCacheLifetimeSeconds *prometheus.Desc
standbyCacheNormalPriorityBytes *prometheus.Desc
standbyCacheReserveBytes *prometheus.Desc
systemCacheResidentBytes *prometheus.Desc
@@ -142,8 +142,8 @@ func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
nil,
)
c.commitLimit = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "commit_limit"),
"(CommitLimit)",
prometheus.BuildFQName(types.Namespace, Name, "commit_limit_bytes"),
"Amount of virtual memory, in bytes, that can be committed without having to extend the paging file(s) (CommitLimit)",
nil,
nil,
)
@@ -167,12 +167,6 @@ func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
nil,
nil,
)
c.freeSystemPageTableEntries = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "free_system_page_table_entries"),
"(FreeSystemPageTableEntries)",
nil,
nil,
)
c.modifiedPageListBytes = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "modified_page_list_bytes"),
"The amount of physical memory, in bytes, that is assigned to the modified page list. This memory contains cached data and code that is not actively in "+
@@ -256,6 +250,13 @@ func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
nil,
nil,
)
c.standbyCacheLifetimeSeconds = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "standby_cache_lifetime_seconds"),
"The long-term average time, in seconds, that a page stays on the standby cache page lists before it is repurposed. "+
"Low values indicate memory pressure (LongTermAverageStandbyCacheLifetime)",
nil,
nil,
)
c.standbyCacheNormalPriorityBytes = prometheus.NewDesc(
prometheus.BuildFQName(types.Namespace, Name, "standby_cache_normal_priority_bytes"),
"The amount of physical memory, in bytes, that is assigned to the normal priority standby cache page lists. This memory contains cached data and "+
@@ -447,12 +448,6 @@ func (c *Collector) collectPDH(ch chan<- prometheus.Metric) error {
c.perfDataObject[0].FreeAndZeroPageListBytes,
)
ch <- prometheus.MustNewConstMetric(
c.freeSystemPageTableEntries,
prometheus.GaugeValue,
c.perfDataObject[0].FreeSystemPageTableEntries,
)
ch <- prometheus.MustNewConstMetric(
c.modifiedPageListBytes,
prometheus.GaugeValue,
@@ -531,6 +526,12 @@ func (c *Collector) collectPDH(ch chan<- prometheus.Metric) error {
c.perfDataObject[0].StandbyCacheCoreBytes,
)
ch <- prometheus.MustNewConstMetric(
c.standbyCacheLifetimeSeconds,
prometheus.GaugeValue,
c.perfDataObject[0].LongTermAverageStandbyCacheLifetime,
)
ch <- prometheus.MustNewConstMetric(
c.standbyCacheNormalPriorityBytes,
prometheus.GaugeValue,
+34 -34
View File
@@ -18,38 +18,38 @@
package memory
type perfDataCounterValues struct {
AvailableBytes float64 `perfdata:"Available Bytes"`
AvailableKBytes float64 `perfdata:"Available KBytes"`
AvailableMBytes float64 `perfdata:"Available MBytes"`
CacheBytes float64 `perfdata:"Cache Bytes"`
CacheBytesPeak float64 `perfdata:"Cache Bytes Peak"`
CacheFaultsPerSec float64 `perfdata:"Cache Faults/sec"`
CommitLimit float64 `perfdata:"Commit Limit"`
CommittedBytes float64 `perfdata:"Committed Bytes"`
DemandZeroFaultsPerSec float64 `perfdata:"Demand Zero Faults/sec"`
FreeAndZeroPageListBytes float64 `perfdata:"Free & Zero Page List Bytes"`
FreeSystemPageTableEntries float64 `perfdata:"Free System Page Table Entries"`
ModifiedPageListBytes float64 `perfdata:"Modified Page List Bytes"`
PageFaultsPerSec float64 `perfdata:"Page Faults/sec"`
PageReadsPerSec float64 `perfdata:"Page Reads/sec"`
PagesInputPerSec float64 `perfdata:"Pages Input/sec"`
PagesOutputPerSec float64 `perfdata:"Pages Output/sec"`
PagesPerSec float64 `perfdata:"Pages/sec"`
PageWritesPerSec float64 `perfdata:"Page Writes/sec"`
PoolNonpagedAllocs float64 `perfdata:"Pool Nonpaged Allocs"`
PoolNonpagedBytes float64 `perfdata:"Pool Nonpaged Bytes"`
PoolPagedAllocs float64 `perfdata:"Pool Paged Allocs"`
PoolPagedBytes float64 `perfdata:"Pool Paged Bytes"`
PoolPagedResidentBytes float64 `perfdata:"Pool Paged Resident Bytes"`
StandbyCacheCoreBytes float64 `perfdata:"Standby Cache Core Bytes"`
StandbyCacheNormalPriorityBytes float64 `perfdata:"Standby Cache Normal Priority Bytes"`
StandbyCacheReserveBytes float64 `perfdata:"Standby Cache Reserve Bytes"`
SystemCacheResidentBytes float64 `perfdata:"System Cache Resident Bytes"`
SystemCodeResidentBytes float64 `perfdata:"System Code Resident Bytes"`
SystemCodeTotalBytes float64 `perfdata:"System Code Total Bytes"`
SystemDriverResidentBytes float64 `perfdata:"System Driver Resident Bytes"`
SystemDriverTotalBytes float64 `perfdata:"System Driver Total Bytes"`
TransitionFaultsPerSec float64 `perfdata:"Transition Faults/sec"`
TransitionPagesRePurposedPerSec float64 `perfdata:"Transition Pages RePurposed/sec"`
WriteCopiesPerSec float64 `perfdata:"Write Copies/sec"`
AvailableBytes float64 `perfdata:"Available Bytes"`
AvailableKBytes float64 `perfdata:"Available KBytes"`
AvailableMBytes float64 `perfdata:"Available MBytes"`
CacheBytes float64 `perfdata:"Cache Bytes"`
CacheBytesPeak float64 `perfdata:"Cache Bytes Peak"`
CacheFaultsPerSec float64 `perfdata:"Cache Faults/sec"`
CommitLimit float64 `perfdata:"Commit Limit"`
CommittedBytes float64 `perfdata:"Committed Bytes"`
DemandZeroFaultsPerSec float64 `perfdata:"Demand Zero Faults/sec"`
FreeAndZeroPageListBytes float64 `perfdata:"Free & Zero Page List Bytes"`
LongTermAverageStandbyCacheLifetime float64 `perfdata:"Long-Term Average Standby Cache Lifetime (s)"`
ModifiedPageListBytes float64 `perfdata:"Modified Page List Bytes"`
PageFaultsPerSec float64 `perfdata:"Page Faults/sec"`
PageReadsPerSec float64 `perfdata:"Page Reads/sec"`
PagesInputPerSec float64 `perfdata:"Pages Input/sec"`
PagesOutputPerSec float64 `perfdata:"Pages Output/sec"`
PagesPerSec float64 `perfdata:"Pages/sec"`
PageWritesPerSec float64 `perfdata:"Page Writes/sec"`
PoolNonpagedAllocs float64 `perfdata:"Pool Nonpaged Allocs"`
PoolNonpagedBytes float64 `perfdata:"Pool Nonpaged Bytes"`
PoolPagedAllocs float64 `perfdata:"Pool Paged Allocs"`
PoolPagedBytes float64 `perfdata:"Pool Paged Bytes"`
PoolPagedResidentBytes float64 `perfdata:"Pool Paged Resident Bytes"`
StandbyCacheCoreBytes float64 `perfdata:"Standby Cache Core Bytes"`
StandbyCacheNormalPriorityBytes float64 `perfdata:"Standby Cache Normal Priority Bytes"`
StandbyCacheReserveBytes float64 `perfdata:"Standby Cache Reserve Bytes"`
SystemCacheResidentBytes float64 `perfdata:"System Cache Resident Bytes"`
SystemCodeResidentBytes float64 `perfdata:"System Code Resident Bytes"`
SystemCodeTotalBytes float64 `perfdata:"System Code Total Bytes"`
SystemDriverResidentBytes float64 `perfdata:"System Driver Resident Bytes"`
SystemDriverTotalBytes float64 `perfdata:"System Driver Total Bytes"`
TransitionFaultsPerSec float64 `perfdata:"Transition Faults/sec"`
TransitionPagesRePurposedPerSec float64 `perfdata:"Transition Pages RePurposed/sec"`
WriteCopiesPerSec float64 `perfdata:"Write Copies/sec"`
}