Another memory usage question / heapdump

160 views
Skip to first unread message

wavded

unread,
Sep 11, 2012, 4:51:39 PM9/11/12
to nod...@googlegroups.com
We have a large application that continues to grow in memory usage as the day goes on (we restart it each day).  I would like to not have to do that.  We have been optimizing the crap out of the JS code and continue to do so and memory "seems" to be under control (or at least understood) in JS land.

We have been using Ben's `heapdump` (https://github.com/bnoordhuis/node-heapdump) module to take snapshots in production and analyze them offline.  Right now one of our servers is sitting at 1.1 GB (RSS) and I just took a heap snapshot and the dump size is 75 MB.. I don't understand where this extra memory is coming from (Buffers?, we do a lot of requests, a bad addon module?).  Not sure how to better debug this as the V8 tools don't seem to be helping.  Any help appreciated.

Jimb Esser

unread,
Sep 11, 2012, 4:58:11 PM9/11/12
to nod...@googlegroups.com
On Linuxy platforms, you can log and analyze native allocations with GCC's mtrace, which I've exposed to node here:  https://github.com/Jimbly/node-mtrace

Unfortunately, with any C++ allocations (which includes Buffers), they're all attributed to a single call site, "operator::new", so your mileage may vary.  If it's a rogue addon which is doing it's own memory allocations, it may help, or you may get lucky and something will jump out at you as suspicious.

wavded

unread,
Sep 11, 2012, 9:00:54 PM9/11/12
to nod...@googlegroups.com
Thanks Jimb, I will take a look at this.  Very much a growing RSS problem but V8 heap staying reasonable.  I am on Linux.

map...@datacaciques.com

unread,
Apr 10, 2014, 10:05:51 PM4/10/14
to nod...@googlegroups.com
Hi, Wavded. Did you solve this problem? I met the same problem as you posted. When I use heapdump, it generate a dump about 186 MB. 



在 2012年9月12日星期三UTC+8上午4时51分40秒,wavded写道:
Reply all
Reply to author
Forward
0 new messages