Reducing GC pauses is a tricky problem.  The best advice I can give is
allocate less objects.  Remember that functions, closures, and arrays
are also objects.  But don't do this blindly without understanding at
the expense of making your code more complicated.  Look at the V8
command-line options in node.  I remember there being several to
expose gc events (as well as optimizer events).

On Fri, Aug 3, 2012 at 1:48 AM, junyi sun <ccnu...@gmail.com> wrote:
> Hi guys,
>
> I am studying node.js. It is a wonderful utility to write network-based
> application.
>
> Now, I have written a memcached server using node.js.  You can have a look
> at https://gist.github.com/3244607
>
> I tested the program, and found it could reach 12000/s throughput. However,
> during the test, I found sometimes the speed suddenly decreased due to the
> GC pause from my mind.
>
>
> Is there a way to improve my code ?
>
>
>
> Thanks
>
> Junyi
>
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> 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 post to this group, send email to nodejs@googlegroups.com
> To unsubscribe from this group, send email to
> nodejs+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to