diff options
author | Gabriel Schulhof <gabriel.schulhof@intel.com> | 2019-12-13 22:59:37 +0300 |
---|---|---|
committer | Gabriel Schulhof <gabriel.schulhof@intel.com> | 2019-12-22 22:49:26 +0300 |
commit | 8952105e576315fcb15cd4c9399e950bc191e854 (patch) | |
tree | 1583553a4d844867aa0e6c07f4b8c139c2c4a1eb /doc | |
parent | 312f3086c21e5c3595909358c54b5e5b9a0d095d (diff) |
src: make --use-largepages a runtime option
Moves the option that instructs Node.js to-remap its static code to
large pages from a configure-time option to a runtime option. This
should make it easy to assess the performance impact of such a change
without having to custom-build.
PR-URL: https://github.com/nodejs/node/pull/30954
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Denys Otrishko <shishugi@gmail.com>
Co-authored-by: David Carlier <devnexen@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/cli.md | 17 | ||||
-rw-r--r-- | doc/node.1 | 10 |
2 files changed, 27 insertions, 0 deletions
diff --git a/doc/api/cli.md b/doc/api/cli.md index f3d5df070cc..d098a199e05 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -876,6 +876,22 @@ environment variables. See `SSL_CERT_DIR` and `SSL_CERT_FILE`. +### `--use-largepages=mode` +<!-- YAML +added: REPLACEME +--> + +Re-map the Node.js static code to large memory pages at startup. If supported on +the target system, this will cause the Node.js static code to be moved onto 2 +MiB pages instead of 4 KiB pages. + +The following values are valid for `mode`: +* `off`: No mapping will be attempted. This is the default. +* `on`: If supported by the OS, mapping will be attempted. Failure to map will + be ignored and a message will be printed to standard error. +* `silent`: If supported by the OS, mapping will be attempted. Failure to map + will be ignored and will not be reported. + ### `--v8-options` <!-- YAML added: v0.1.3 @@ -1133,6 +1149,7 @@ Node.js options that are allowed are: * `--track-heap-objects` * `--unhandled-rejections` * `--use-bundled-ca` +* `--use-largepages` * `--use-openssl-ca` * `--v8-pool-size` * `--zero-fill-buffers` diff --git a/doc/node.1 b/doc/node.1 index c783195c957..4c634778894 100644 --- a/doc/node.1 +++ b/doc/node.1 @@ -402,6 +402,16 @@ See and .Ev SSL_CERT_FILE . . +.It Fl -use-largepages Ns = Ns Ar mode +Re-map the Node.js static code to large memory pages at startup. If supported on +the target system, this will cause the Node.js static code to be moved onto 2 +MiB pages instead of 4 KiB pages. +.Pp +.Ar mode +must have one of the following values: +`off` (the default value, meaning do not map), `on` (map and ignore failure, +reporting it to stderr), or `silent` (map and silently ignore failure). +. .It Fl -v8-options Print V8 command-line options. . |