GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — doc: Add useful V8 option section by nimit95 · Pull Request #32262 · nodejs/node Conversation
|
|
|
||
| These are v8 options and fall outside Node.js' responsibility. | ||
|
|
||
| V8 options that are allowed are: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think this should either be removed completely or at least reworded. Node does not restrict the V8 options that can be passed on the command line.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
There is another place in the document mentioning the same thing.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| Sets the max memory size of V8 old memory section. As memory consumption approaches the limit, V8 will spend more time on garbage collection in an effort to free unused memory. | ||
|
|
||
| On a machine with 2GB of memory it suggested to set 1.5GB to leave some memory for other uses and avoid swapping. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Sets the max memory size of V8 old memory section. As memory consumption approaches the limit, V8 will spend more time on garbage collection in an effort to free unused memory. | |
| On a machine with 2GB of memory it suggested to set 1.5GB to leave some memory for other uses and avoid swapping. | |
| Sets the max memory size of V8 old memory section. As memory | |
| consumption approaches the limit, V8 will spend more time on | |
| garbage collection in an effort to free unused memory. | |
| On a machine with 2GB of memory it suggested to set 1.5GB to | |
| leave some memory for other uses and avoid swapping. |
nit: need to wrap lines at <= 80 chars
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| ## Useful v8 options | ||
|
|
||
| These are v8 options and fall outside Node.js' responsibility. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| These are v8 options and fall outside Node.js' responsibility. | |
| V8 has CLI options. Any V8 CLI option that is provided to `node` will be passed on to V8 to handle. V8's options have _no stability guarantee_. The V8 team themselves don't consider them to be part of their formal API, and reserve the right to change them at any time. The Node.js team does not consider them covered by the Node.js stability guarantees. Many of the V8 options are of interest only to V8 developers. Despite this, there is a small set of V8 options that are widely applicable to Node.js, and they are documented here. |
I think we should say something like the above.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| V8 options that are allowed are: | ||
|
|
||
| ### `--max-old-space-size` |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| ### `--max-old-space-size` | |
| ### `--max-old-space-size=SIZE` (in Mbytes) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Co-Authored-By: mscdex <[email protected]>
Co-Authored-By: mscdex <[email protected]>
|
according to me, explaning the gc behavior is not necessary while describing the heap size flag. also, elaborate description about API stability can confuse people? how about just this: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Detailed about V8 because people can get confused about the behaviour of GC, we are explicitly mentioning that it is managed by V8 here. Also, it doesn't lie in node preview. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Nimit <[email protected]>
| and reserve the right to change them at any time. The Node.js team does not | ||
| consider them covered by the Node.js stability guarantees. Many of the V8 | ||
| options are of interest only to V8 developers. Despite this, there is a small | ||
| set of V8 options that are widely applicable to the Node.js, and they are |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| set of V8 options that are widely applicable to the Node.js, and they are | |
| set of V8 options that are widely applicable to Node.js, and they are |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| consider them covered by the Node.js stability guarantees. Many of the V8 | ||
| options are of interest only to V8 developers. Despite this, there is a small | ||
| set of V8 options that are widely applicable to the Node.js, and they are | ||
| documented here. V8 options that are allowed are: |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| documented here. V8 options that are allowed are: | |
| documented here: |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| consumption approaches the limit, V8 will spend more time on | ||
| garbage collection in an effort to free unused memory. | ||
|
|
||
| On a machine with 2GB of memory it suggested to set 1.5GB |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| On a machine with 2GB of memory it suggested to set 1.5GB | |
| On a machine with 2GB of memory it is suggested to set this to 1536 (1.5GB) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
|
||
| ### `--max-old-space-size=SIZE` (in Mbytes) | ||
|
|
||
| Sets the max memory size of V8 old memory section. As memory |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
| Sets the max memory size of V8 old memory section. As memory | |
| Sets the max memory size of V8's old memory section. As memory |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Nimit <[email protected]>
|
Just a note: when squashing/landing, make sure 'V8' is used instead of 'v8' in the commit message to avoid confusion. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Anything to be done here from me? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| and reserve the right to change them at any time. The Node.js team does not | ||
| consider them covered by the Node.js stability guarantees. Many of the V8 |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Optional nit:
| and reserve the right to change them at any time. The Node.js team does not | |
| consider them covered by the Node.js stability guarantees. Many of the V8 | |
| and reserve the right to change them at any time. Likewise, they are not | |
| covered by the Node.js stability guarantees. Many of the V8 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| consumption approaches the limit, V8 will spend more time on | ||
| garbage collection in an effort to free unused memory. | ||
|
|
||
| On a machine with 2GB of memory it is suggested to set this to |
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Missing comma:
| On a machine with 2GB of memory it is suggested to set this to | |
| On a machine with 2GB of memory, it is suggested to set this to |
Optional nit: I'm not a fan of "it is suggested" or "it is recommended" formulations. If possible, either tell people to do something or don't tell them at all. If you can't make a blanket statement, it might at least be a little more direct with something like "consider":
| On a machine with 2GB of memory it is suggested to set this to | |
| On a machine with 2GB of memory, consider setting this to |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Understood.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| On a machine with 2GB of memory it is suggested to set this to | ||
| 1536 (1.5GB) to leave some memory for other uses and avoid swapping. | ||
|
|
||
| E.g. `node --max-old-space-size=1536 index.js` |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Optional nit: Delete this line.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I personally feel an example helps a lot when being introduced to a flag. It clearly shows how to pass an argument. @Trott
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I personally feel an example helps a lot when being introduced to a flag
If we want to provide an example, it should conform with the formatting of the other examples provided elsewhere in the doc. Otherwise, each entry is inventing its own example formatting, and we definitely do not want that. The existing format is more useful than this as it provides context, such as what the anticipated output might look like. So, this example might show the error one might get if running without the flag, then show the command succeeding with the flag.
(That said, most of our entries do not contain examples and that seems appropriate in this document.)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Totally agree with your point, Can you point me to some of the correct existing formats?
What I see a mixture of formats, some given below
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I don't mean the format of the command itself. I mean the markdown formatting that denotes an example.
```console $ node --cpu-prof index.js $ ls *.cpuprofile CPU.20190409.202950.15293.0.0.cpuprofile ```
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@Trott can you check out the formatting once now.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@Trott do you want to apply your suggestions and merge this? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Hey, will make the changes today. Totally forgot about this :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Nimit <[email protected]>
|
My one remaining comment is a nit. In other words, it expresses my personal opinion, but I don't feel so strongly about it that I would block landing this if others disagree with my view. So if @addaleax or anyone else thinks this should land now as it is, go for it. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Signed-off-by: Nimit <[email protected]>
This adds new section for v8 options and --max-old-space-size Fixes: #32252 PR-URL: #32262 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
|
landed in df05b07 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
This adds new section for v8 options and --max-old-space-size Fixes: #32252 PR-URL: #32262 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
This adds new section for v8 options and --max-old-space-size Fixes: #32252 PR-URL: #32262 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
This adds new section for v8 options and --max-old-space-size Fixes: #32252 PR-URL: #32262 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.