20

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?

4

1 に答える 1

3

アプリが何をしているかを知らなければ、これについてコメントすることはできません。

V8 ヒープの使用率が RSS よりも大幅に低い場合、はい、V8 以外のオブジェクトによって使用される外部バッファーおよびその他のメモリである必要があります。

いくつかのコードを公開できますか?

于 2012-10-30T22:27:01.493 に答える