On Thu, Apr 28, 2016 at 7:31 PM, Haitao Li <[email protected]> wrote:
> Hi Ben, thanks for your reply. Somehow I didn't get the notification for it.
> I've enabled logging and found that it's MarkSweepCompact that's taking
> long. In each nodejs process in the past one hour, MarkSweepCompact occurs
> almost exactly once per minute. About 1/3 of them take longer than 100ms.
> Because my project is a service to other internal nodejs apps, a request
> that takes more than 100ms to finish returns ETIMEDOUT on client side. I'm
> willing to sacrifice average response time a bit to reduce max response
> time. Can I reduce max_old_space_size to make MarkSweepCompact run more
> often but quicker each time?

That can certainly help but it depends on your application's
allocation patterns.

GC times are proportional to the number of live objects (dead objects
aren't traversed) so reducing the size of the old space will only help
if it means that the set of live objects shrinks as well.  It won't do
much if your application is of the kind that creates a lot of
long-lived objects at start-up but everything else is short-lived.

-- 
Job board: http://jobs.nodejs.org/
New group rules: 
https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/nodejs/CAHQurc8q%2BTpHOuRBZU8OLky94aJja48z%3DfMghnJVca_4FhfW3Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to