Tracing Node's Garbage Collection

Feb 21, 2020 min read

The Chrome V8 engine helps monitor and evaluate garbage collection used in NodeJS.

A simple command:

node --trace_gc app.js

By passing --trace_gc we can start to see Scavenge and Mark-sweep calls produced.

For a more in depth understanding of the Node Garbage collector, and why you should care: Node Garbage Collector