Version
18.7.0
Platform
macOS 12.5.1 (Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64)
Debian GNU/Linux 11 (bullseye)
Subsystem
No response
What steps will reproduce the bug?
Simply run the following command on both platform.
$ node -e "console.log('rss', process.memoryUsage.rss(), '; max rss', process.resourceUsage().maxRSS)"
How often does it reproduce? Is there a required condition?
Always. No required condition.
What is the expected behavior?
According to the process.resourceUsage() document, maxRSS should have "maximum resident set size used in kilobytes".
What do you see instead?
On Linux (tag: 18.7.0-slim):
$ docker run --rm node:18.7.0-slim node -e "console.log('rss', process.memoryUsage.rss(), '; max rss', process.resourceUsage().maxRSS)"
rss 40235008 ; max rss 39292
On the other hand, macOS host:
$ node -v
v18.7.0
$ node -e "console.log('rss', process.memoryUsage.rss(), '; max rss', process.resourceUsage().maxRSS)"
rss 32104448 ; max rss 32108544
It looks like on Linux it reports correctly in kilobytes; but on macOS, it seems to be just bytes.
Additional information
N/A
Version
18.7.0
Platform
macOS 12.5.1(Darwin Kernel Version 21.6.0: Wed Aug 10 14:25:27 PDT 2022; root:xnu-8020.141.5~2/RELEASE_X86_64)Debian GNU/Linux 11 (bullseye)Subsystem
No response
What steps will reproduce the bug?
Simply run the following command on both platform.
$ node -e "console.log('rss', process.memoryUsage.rss(), '; max rss', process.resourceUsage().maxRSS)"How often does it reproduce? Is there a required condition?
Always. No required condition.
What is the expected behavior?
According to the
process.resourceUsage()document,maxRSSshould have "maximum resident set size used in kilobytes".What do you see instead?
On Linux (tag:
18.7.0-slim):On the other hand, macOS host:
It looks like on Linux it reports correctly in kilobytes; but on macOS, it seems to be just bytes.
Additional information
N/A