We are deploying a Node.js application. This app seems to be consuming way more RSS memory than it should. So we started to dive into things and we found the following, thanks to process.memoryUsage();
The RSS memory grows quickly to about 400MB and stays more or less stable in a 400MB-500MB, with small ups and small downs (Garbage collector running?)
The heapUsed quickly grows to 50MB and then stays at that level (between 20MB and 100MB).
The heaptotal is always about 30MB more MB than the heapUsed.
As you see there is a huge difference between the heap and the RSS, which is where I think we should focus. There doesn't seem to be any very significant leak in our heap.
Now, what's in RSS that is not in the heap? I believe C extensions, and Buffers, right? If so, how can we debug that. What else should we look for?