liveBook · Manning

Maximum resident set size

As explained in JavaScript in Depth

A process metric recording the highest resident memory footprint reached during the process lifetime.

A memory spike can disappear from current RSS while remaining visible in maximum resident set size (maxRSS). The metric records the highest resident footprint reached since process start, so it only increases. section 11.1.2

Interpret maxRSS with these rules:

  • Use it to assess peak memory pressure, especially whether a container may hit its memory limit during load spikes. section 11.1.2
  • Do not treat it as current RSS: a process that peaked at 500 MB and settled at 200 MB still reports 500 MB. section 11.1.2
  • Read units by platform: Linux reports kilobytes, while macOS reports bytes. section 11.1.2

How JavaScript in Depth covers it

How deep it goes
Defines cumulative peak behavior, contrasts it with current RSS, and identifies Linux and macOS unit differences.
Examples
Uses a 500 MB traffic spike followed by a 200 MB recovery and a process.resourceUsage() output listing.
What you can do after
Diagnose peak-memory risk by reading maxRSS as a cumulative metric and normalizing its platform-specific units.
How it connects
Connects resident set size with process.resourceUsage(), memory pressure, containers, and load spikes.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of JavaScript in Depth. The section links point to the parts of the book it draws on.