Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

worker: add flag to control old space size #43995

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Commits on Jul 26, 2022

  1. worker: add flag to control old space size

    This adds a new flag `--thread-max-old-space-size` (name completely
    provisional). This has two advantages over the existing
    `--max-old-space-size` flag:
    
    1. It allows setting the old space size for the main thread and using
       `resourceLimits` for worker threads. Currently `resourceLimits` will
       be ignored when `--max-old-space-size` is set (see the attached
       issues).
    2. It is implemented using V8's public API, rather than relying on V8's
       internal flags whose stability and functionality are not guaranteed.
    
    The downside is that there are now two flags which (in most cases) do
    the same thing, so it may cause some confusion. I also think that we
    should deprecate `--max-old-space-size`, since the semantics feel pretty
    error-prone, but that's a story for another day.
    
    Refs: nodejs#41066
    Refs: nodejs#43991
    Refs: nodejs#43992
    kvakil committed Jul 26, 2022
    Configuration menu
    Copy the full SHA
    6c14bbe View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f1fdb84 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    61b6baa View commit details
    Browse the repository at this point in the history