StaticbudgetEvery process's heap budget, computed once per process: carried across the front process's re-exec, taken from an operator's own flag, or derived.
the budget
StaticcgroupReads the container's memory limit from its cgroup: v2 first, then v1 and v1's hierarchical limit.
Optionalread: Reader
optional; reads a file, for tests
{ bytes, source }, bytes null when there is no limit
StaticcontainerThe container's memory limit: the cgroup's, else the ECS task's.
{ bytes, source }
StaticderiveDerives every process's heap budget. A decision over its arguments.
configuredMb (workers.heapLimitMb), limitBytes and
its source, and the two pool sizes
the budget; mb 0 when no limit is to be set
StaticdescribeOne snapshot as the line the report logs.
the snapshot
the line
StaticecsReads the ECS task's memory limit from the task metadata endpoint, when
ECS_CONTAINER_METADATA_URI_V4 is set.
the limit in bytes, or null
StaticensureRegisters process.memory-report with the scheduler, once. Called by
protocol_stack.ts in every process that builds the stack.
the scheduler instance
StaticexplicitThe heap limit an operator set with the flag, on the command line or in NODE_OPTIONS.
the node options to read (process.execArgv)
NODE_OPTIONS
the limit in MiB, or 0 when none was set
StaticheapThis process's heap limit, as V8 has it.
MiB
StaticoomHow many processes the kernel's OOM killer has killed in this
container's cgroup: v2 memory.events, else v1 memory.oom_control.
Optionalread: Reader
optional; reads a file, for tests
the count, or null when no counter is visible
StaticreadReads a file as text; the default reader of every method below.
the path
its contents
StaticreexecReplaces the front process with itself started with the heap flag, when
a limit is due and not yet in force. Called by server.js before it
loads the service; does not return when it re-executes.
what was done: { reexec: false, why }
StaticreportOne run of process.memory-report: logs this process's line, sends a
request worker's figures to the front process, and answers the run's
summary.
the snapshot
StaticrequestHow many request worker threads this process runs: workers.requestCount,
except that its default of 1 is 0 where the store cannot coordinate.
the count, 0 or more
StaticresetForgets the computed budget; for tests.
StaticroleWhat this process is: front, protocol worker or surface worker.
the role
StaticsettingsStaticsnapshotThis process's memory figures, in MiB.
the snapshot
The heap limit of every process of a node, derived from the container, and the per-process memory report. A static utility class.