From the official documentation (source):
process.memoryUsage()
Returns an object describing the memory usage of the Node process
measured in bytes.
var util = require('util');
console.log(util.inspect(process.memoryUsage()));
This will generate:
{ rss: 4935680, heapTotal: 1826816, heapUsed: 650472 }
heapTotal and heapUsed refer to V8's memory usage.
Exactly what do rss, heapTotal, and heapUsed stand for?
It might seem like a trivial question, but I've been looking and I could not find a clear answer so far.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…