...
An operational XVM continuously collects raw statistics during the course of its operation. The xvm can also be configured to spin up a background thread that periodically performs the following:
- Perform Performs higher level statistical computations such as calculate message rates and average latencies.
- Emits heartbeat messages to be processed by handlers.
- Optionally outputs server statistics to named trace loggers using the platform's tracing and logging system.
- Optionally writes heartbeat messages containing useful server-wide statistics to a binary transaction log (with zero steady-state allocations).
- Detect Detects violation/abatement of alert thresholds and dispatch appropriate alert events.
The raw metrics are collected by the server are used by the background statistical thread for its computations and can also be retrieved programatically programmatically by an application for its own use.
In this document, we describe:
- Describe the various raw metrics captured by the server,
- Describe how to switch on and configure the statistics thread operation,
- Describe the higher level statistics calculations performed by the statistics thread,
- Describe and the format of the output of the statistics thread.
...
When heartbeats are enabled via the nv.server.stats.enable and nv.server.stats.interval properties they can be handled in several ways:, discussed below.
Tracing Heartbeats
By default all server statistics tracers are disabled as trace logging is not zero garbage and introduce introduces cpu overhead in computing statistics. While tracing heartbeats isn't recommended in production, enabling server statistics trace output can be useful for debugging and performance tuning. To enable you will need to configure the appropriate tracers at the debug level. See the Output Trace Loggers section for more detail.
...
Note that at this time binary heartbeat logs do not support rolling collection ... , so at this time the built-in hearbeat heartbeat logging mechanism is not suitable for long running application instances.
...
- Compute higher level statistics such as metric averages.
- Output raw and computed statistics to any trace loggers configured at the debug level.
- Emit heartbeat messages consumed by handlers and the heartbeat log, if enabled.
The statistics thread can be enabled or disabled via the configuration parameters.
...
To reduce the size of heartbeats, Pool Stats for a given pool are only included when:
...
The server statistics thread uses several named trace loggers to log the raw and computed statistics output. The following is the list of the loggers used by the server stats thread:.
- nv.server.stats.sys.trace – tracer for System Statistics
- nv.server.stats.thread.trace – tracer for Thread Statistics
- nv.server.stats.pool.trace – tracer for Pool Statistics
- nv.server.stats.app.trace – tracer for Application and Engine Statistics
- nv.server.stats.userstats.trace – tracer for User Defined Statistics
If you would like to see server statistics trace output, the appropriate tracers need to be configured at the debug level. For example, too to enable System Stats trace output:
...
Appears in trace output when nv.server.stats.enable=true and nv.server.stats.app.trace=debug.
The below example is output from the Tick To Trade sample application available in GitHub.
Panel |
---|
[App (ems) Engine Stats] [App (ems) Store Binding Stats] |
...