Exposes node v8 garbage collection stats
npm install @apminsight/native-statsThe [Site24x7 Node.js agent][1] uses @apminsight/native-stats, a native node add-on for collecting GC and event loop stats using the Chromes' V8 engine. These metrics can help improve your application's performance and identify bottlenecks in the application.
Before you can use NVM, you need to install the [Site24x7 Node.js agent.][2]
To get APM Insight NVM, follow the below given instructions.
- Node VM installation
- Prerequisites to install NVM
- Getting started
- Performance Metrics
- The native module is automatically installed while installing the [Node.js agent.]3.
- During installation, the native module first attempts to build from the source on the target machine. If the build fails, Node.js prints a stack trace to the console, which you can ignore.
- If the native module build is successful, you can see all the metrics, including garbage collection, memory usage, event loop data, and CPU utilization. If the build fails, you can only see memory and CPU related metrics.
| Platform | Environment |
| ---------- | ---------------------------------- |
| Unix/Linux | Make, C/C++ compiler (such as GCC) |
| macOS | Xcode Command Line Tools |
| Windows | Visual C++ Build Environment |
Gain insight into useful runtime data for troubleshooting performance issues and monitoring your application's health with NVM metrics.
To view the NVM metrics in the client:
- Log in to your [Site24x7][4] web client
- Navigate to APM > your Node.js application > click the Node VM tab.
- Select the time frame for which you need the metrics.
You will get the graphs and metrics using which you can troubleshoot performance issues.
- GC Pause Time: The amount of time spent on garbage collection. Spikes in GC time usually indicate a problem.
- GC Pause Frequency: The number of GC runs performed per minute.
- Memory Usage: The amount of memory consumed by the Node.js process.
- CPU Utilization: The CPU utilization of the Node.js process.
- Event Loop Ticks Per Minute: The number of event loop ticks per minute.
- Max CPU time per tick: The maximum amount of time spent in a single tick per minute.
[1]: https://www.site24x7.com/help/apm/nodejs-agent.html
[2]: https://www.site24x7.com/help/apm/nodejs-agent/Install-Node.js-Agent.html
[3]: https://www.site24x7.com/help/apm/nodejs-agent/Install-Node.js-Agent.html#v2.0
[4]: https://www.site24x7.com/