In New Relic APM, the Node VMs page provides useful runtime data for troubleshooting performance issues and monitoring the health of your application.
Access to this feature depends on your subscription level.
Compatibility and requirements
View Node VM statistics
To correlate spikes or upward trends in any of these measurements with specific transactions:
- Go to rpm.newrelic.com/apm > APM > (select an app) > Monitoring > Node VMs.
- Select the time period by clicking and dragging within any of the charts.
- Navigate to the Transactions page or any other page.
As you go to other pages, the time picker selection will remain the same.
Analyze performance issues
Here is a summary of the data available on individual Node VM charts. By using all of the charts together, you can troubleshoot performance issues. For example:
- When the application starts using more objects, memory usage will increase, and garbage collection (GC) will run more frequently. CPU utilization will increase due to time spent in GC.
- Abnormally long synchronous code execution can increase CPU utilization. This will show spikes in the Event loop max CPU time per tick chart.
- GC pause time
The amount of time spent in garbage collection. For a single server, the chart shows average, max, and total time per minute. For multiple servers, the chart shows total time grouped by server.
Typically, spikes in GC time or frequency indicate a potential issue.
- GC pause frequency
The number of times GC runs were executed per minute. For a single server, the chart is broken down by the type of GC. For multiple servers, the chart shows total number of GC calls (all types combined) grouped by server.
- GC pause time by type
This chart shows the total time spent in garbage collection per minute, broken down by GC type. It is only shown when viewing a single server. You might see the following types depending on your version of Node.js and app activity:
Value Description Scavenge The most common garbage collection method. Node.js will typically trigger one of these every time the VM is idle. MarkSweepCompact The heaviest type of garbage collection V8 may do. If you see many of these happening you will need to either keep fewer objects around in your process or increase V8's heap limit. IncrementalMarking A phased garbage collection that interleaves collection with application logic to reduce the amount of time the application is paused. Only in Node.js v6 or higher. ProcessWeakCallbacks After a garbage collection occurs, V8 will call any weak reference callbacks registered for objects that have been freed. This measurement is from the start of the first weak callback to the end of the last for a given garbage collection. Only in Node.js v6 or higher.
- Memory usage
This chart shows the amount of memory consumed by the Node.js process. For multiple servers, the chart shows total memory grouped by server. For a single server, the chart is segmented by the following types of memory:
- CPU utilization
This chart shows the CPU utilization of the Node process.
For multiple servers, the chart shows total CPU utilization grouped by server. For a single server, the chart is segmented by the following:
Value Description User
The time spent executing the user code, divided by wall-clock time.
System The time spent in the system kernel on behalf of the Node process, divided by wall-clock time.
- Event loop — ticks per minute
This chart shows the number of event loop ticks per minute. A tick is a single turn of the event loop, in which functions that are ready to be executed are run.
As a part of each event loop turn, Node waits for pending I/O to complete. Once any I/O events are received, the event loop executes callbacks associated with it. Therefore, the number of ticks per minute corresponds to how frequently I/O events occur.
- Event loop — max CPU time per tick
- This chart shows the maximum time spent in a single tick per minute. This is useful with detecting an abnormally long event loop tick, which indicates long synchronous code execution.
View clusters of multiple processes
When multiple Node.js processes on the same server report to the same New Relic application, these charts will show aggregated data. This is because each worker process in a cluster has its own separate Node.js runtime and collects separate data.
|Sum across all workers||
The following charts show a sum across all workers:
|Average from all workers||
The following charts show an average from all workers:
|Max across all workers||
The following charts show max across all workers:
For more help
Additional documentation resources include: