Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Is anybody making a Node-optimized V8?

Is anybody making a Node-optimized V8?

Problem

Is there an optimized version of V8 for server-side JavaScript (Node, primarily)? I ask because I assume normal V8 is optimized for Chrome, thus client side JavaScript.

Problem courtesy of: Aaron Yodaiken

Solution

It used to be the case that V8's memory management was not optimized for very big heaps. However with the new GC starting in V8 version 3.7 that should be history. Run with the --max-old-space-size=8192 Flag. Now you can have an 8Gbyte heap instead of the normal 1.4Gbyte limit.

If short pauses are very important to you you can also use the --max-new-space-size=2048 flag. This will reduce Peak Performance, but shorten the pauses from somewhere around 100ms to more like 20ms. On the other hand if you only care about peak performance and do not care about long Pause times you can use the --noincremental-marking flag. With this flag you can expect pause times of around 1 second per gigabyte, so it would mainly be useful for small heaps or batch processing tasks.

Solution courtesy of: Erik Corry

Discussion

View additional discussion.



This post first appeared on Node.js Recipes, please read the originial post: here

Share the post

Is anybody making a Node-optimized V8?

×

Subscribe to Node.js Recipes

Get updates delivered right to your inbox!

Thank you for your subscription

×