Memory Monitor Event Reporting
Starting with Lynx 4.4, memory monitoring provides coordinated page-level and process-level event reporting. These events help identify pages with high memory usage, concurrent page instances, large shared VMs, and sustained memory contributions after page exit.
This page describes the Lynx 4.5 reporting contract and explains the earlier version differences below.
Version Availability
The event names alone do not guarantee the same payload across versions. In particular, Lynx 4.4 residual persistence uses sampled residual observations; do not combine it directly with Lynx 4.5 interval-based persistence. Use the event reference for the SDK version that produced the data.
Interpreting Reported Data
- Compare early memory with the same observation window. Each eligible page instance contributes at most one summary of total, background-thread runtime (BTS), and main-thread runtime (MTS) memory within the first 20 seconds after its first load completes, or before exit if earlier. Compare these means and observed peaks with equivalent summaries from other instances. An observed peak is not a continuous measurement of the maximum.
- Use the right denominator for residency. Page residency uses a complete 10-minute observation window. Calculate survival rates only among pages that had the full opportunity to reach that age.
- Distinguish page attribution from shared heaps. Global accounting counts a shared heap once by actual VM identity. Page-attributed bytes and whole-VM heaps describe different scopes; summing them can double-count memory. For persistence, examine both average memory and cumulative memory contribution over time.
- Account for sampling and field availability. Process selection controls event coverage, while sampled entity details have corresponding weights. Respect those weights and event validity conditions when aggregating. Engine support and UI collection settings affect which memory components are available.
- Use observation time rather than arrival time. Events reach the host asynchronously through the SDK statistics service. Align analysis with event observation timestamps and windows instead of the time the monitoring platform receives them.
- Keep SDK accounting separate from process PSS. Their scopes differ. SDK-accounted bytes help attribute Lynx memory, but do not explain every change in process PSS. Residuals after page exit, even when confirmed by a later full GC, do not by themselves prove a permanent leak.
Enable Reporting
For Lynx 4.4 and later:
Provide memory_monitor_config through the host configuration/Trail integration before settings are first read, normally before creating the first page or VM. global_sample_rate defaults to 0, which disables this event reporting system. Configuration and process sampling decisions are initialized once per process.
For a diagnostic session with UI collection and scheduled page-event delivery enabled in every process:
For online monitoring, choose sampling rates according to the required coverage and event budget. After global process selection, UI collection and scheduled page-event delivery each make an independent conditional draw. page_scheduled_sample_rate only controls scheduled page-event delivery; it does not disable planned observations, early summaries, or global events.
Events are delivered to the host through the SDK statistics service. The host must integrate that service and forward events to its monitoring platform. See Memory Monitor Configuration for platform configuration entries, defaults, and sampling examples.
Event Overview
All event families in this table are available from Lynx 4.4. The descriptions follow the Lynx 4.5 contract; consult version-matched references for individual fields.
These events have different triggers and validity conditions. Not every observation produces every event, and available memory components depend on the engine and collection settings.
Detailed Documentation
For event fields, production conditions, sampling weights, aggregation formulas, and query examples, read the source repository's docs:
- Documentation index
- Global reporting design
- Page reporting design
- Event property reference
- Monitoring query guide
Internal and open-source documentation can differ. Use the documentation in the corresponding source repository and SDK version.