I have a node.js app with dependencies on 50+ modules. A worker process consumes about 1G memory, as shown in RES column of "top" command output. CPU load is light. Ever since I upgraded node.js from 0.10 to 4.2.3, I noticed the response time increased quite a bit. I can't totally blame nodejs because I also upgraded a few modules with it. Most requests are completed within 100ms, but a fraction of them can take more than 300ms. During the first couple of hours after server starts, everything looks normal. Then delays start to occur at different places. That makes me believe it's related to memory usage. CPU profiling didn't reveal anything interesting.
Questions:
1. Can GC cause delays of more than 100ms?
2. How do I find out what objects are allocated for processing one request? If there is a way to disable gc, then I can take snapshots before and after the request to compare. But if gc kicks in during that process I lose track of what were allocated then subsequently released by gc.