在使用node.js时,是否有很好的V8命令行参数引用

时间:2022-08-19 18:29:06

I can't seem to find a good reference for the various command line options available with Node.js. I'm specifically interested in those that control V8 memory usage. e.g. --max_new_space_size, --max_old_space_size, etc.

对于Node.js提供的各种命令行选项,我似乎找不到好的参考。我特别感兴趣的是那些控制V8内存使用的。例如,max_new_space_size——max_old_space_size等等。

Where can I find out what those mean?

我在哪儿能知道那是什么意思?

Thanks!

谢谢!

3 个解决方案

#1


6  

If you start node with the argument --v8-options, you'll get a list of all v8 related options for node. Not sure that there is any specific DOC that outlines all these options (though would definitely be nice to have).

如果您以参数——v8-options开始node,您将得到node所有v8相关选项的列表。不确定是否有任何特定的文档列出了所有这些选项(尽管拥有这些选项肯定很好)。

#2


3  

2 years and no definitive answer. I used the v8 source as a reference:

2年,没有明确的答案。我使用v8源作为参考:

github.com/v8/v8/blob/master/src/flag-definitions.h

github.com/v8/v8/blob/master/src/flag-definitions.h

These should also work in chrome via --js-flags.

这些也可以通过js-flags在chrome中工作。

#3


0  

There is a somewhat dated list of Node.js v8 flags at

节点列表有些过时。js v8国旗在

https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md

https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md

This is a community driven list that provides a few details about what the option does, the unit of measure, and the default values.

这是一个社区驱动的列表,提供了关于选项的功能、度量单位和默认值的一些细节。

#1


6  

If you start node with the argument --v8-options, you'll get a list of all v8 related options for node. Not sure that there is any specific DOC that outlines all these options (though would definitely be nice to have).

如果您以参数——v8-options开始node,您将得到node所有v8相关选项的列表。不确定是否有任何特定的文档列出了所有这些选项(尽管拥有这些选项肯定很好)。

#2


3  

2 years and no definitive answer. I used the v8 source as a reference:

2年,没有明确的答案。我使用v8源作为参考:

github.com/v8/v8/blob/master/src/flag-definitions.h

github.com/v8/v8/blob/master/src/flag-definitions.h

These should also work in chrome via --js-flags.

这些也可以通过js-flags在chrome中工作。

#3


0  

There is a somewhat dated list of Node.js v8 flags at

节点列表有些过时。js v8国旗在

https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md

https://github.com/thlorenz/v8-flags/blob/master/flags-0.11.md

This is a community driven list that provides a few details about what the option does, the unit of measure, and the default values.

这是一个社区驱动的列表,提供了关于选项的功能、度量单位和默认值的一些细节。