Heap used reports "Resident Set Size" instead of "Used Heap" size when profiling Node.js
See original GitHub issueHey 👋 We’ve recently been using this vscode extension to capture and investigate performance profiles while working on Next.js, this is mostly focused on CPU profiling. Today I was having a look at some memory leak reports and realized memory usage was growing uncontrollably up to 1GB in the debugger chart while the Chrome devtools debugger kept saying only 54MB was allocated.
When looking at process.memoryUsage() I realized that the extension reports the process.memoryUsage().rss instead of process.memoryUsage().heapUsed which Chrome reports. Below the chart it is labeled as “Heap used” though.
My main question is if this is a mistake or intentional? Happy to send a PR to update the label or measurement.
(just for my own future reference) In looking at the issue I found this article that goes in-depth on the differences between the metrics reported https://www.dynatrace.com/news/blog/understanding-garbage-collection-and-hunting-memory-leaks-in-node-js/
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (5 by maintainers)

Top Related StackOverflow Question
Yes, a change to
heapUsedwould be good. Thanks for linking the article, it’s quite helpful, especially this diagram:Thanks for landing this @connor4312 🎉