Does anyone make a Node-optimized V8?

Is there an optimized version of V8 for server-side JavaScript (Node in the first place)? I ask because I assume that the regular V8 is optimized for Chrome, therefore client-side JavaScript.

+4
source share
1 answer

It used to be that V8 memory management was not optimized for very large heaps. However, with the new GC, starting with version V8 3.7, which should be history. Run the flag -max-old-space-size = 8192. Now you can have a bunch of 8 GB instead of the usual limit of 1.4 GB.

If short pauses are very important to you, you can also use the -max-new-space-size = 2048 flag. This will reduce maximum performance, but shorten pauses from about 100 ms to more than 20 ms. On the other hand, if you only care about maximum performance and do not care about long pauses, you can use the -noincremental-marking flag. With this flag, you can expect pause periods of about 1 second per gigabyte, so this will mostly be useful for small heap or batch processing tasks.

+6
source

Source: https://habr.com/ru/post/1382972/


All Articles