Tracing Node's Garbage Collection

In this blog post I'll show you a quick way to peak into Node's garbage collection.

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